Share feedback, ideas and get community help

Updated 7 months ago

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.
B
2 comments
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:

Plain Text
Math.floor(Math.random() * 7) + 1
Add a reply
Sign up and join the conversation on Discord