T
Typebot4mo ago
Robert

Counter

I want to set up a counter, which goes from 0 to 7, where each number represents a salesperson's number. So whenever someone starts chatting, they receive the number of the salesperson where the accountant is, so the customers will always be divided equally between the 7 salespeople, I started programming college last semester but I haven't seen anything about JS yet, so I'm very confused. how to do this.
1 Reply
Baptiste
Baptiste4mo ago
So you just need to set a variable that randomly select a number between 1 and 7? You can set this code in a Set variable block Custom content:
Math.floor(Math.random() * 7) + 1
Math.floor(Math.random() * 7) + 1
Want results from more Discord servers?
Add your server