Creating a unique counter (attribute) for each individual users

(Yun) #1

I’m currently building a simple chatbot for my online store.

However, I need to assign a unique order number to each order made by any user.

For example:

Jack ordered a pair of slippers from me today. (Order #1)
Then he ordered an apple from me tomorrow. (Order #2)
Amy ordered a pair of shoes from me just now. (Order #1)

(Kellsey Shaw) #2

Hi Yun,

You can easily increment a counter value stored in an Attribute. You simply need to give the attribute a name and then use +1 in the value box to increment it :smiley:

(Felipe Marquardt) #3

How to reset the attribute once the flow is restarted? Is there a way to make the attribute 1 again if the flow restarts?

(Daniel Beckett) #4

Hi @agenciaadd

At the start of your flow you can set the attribute back to 1. All you need to do is add the attribute again and set the value as 1.

(Felipe Marquardt) #5

Thank you Daniel.
I´m integrating Flowxo with Dialogflow.
and trying to create a flow to ask for phone number and email when the user asks something not expected several times. If Dialogflow responds more than 3 times “Sorry, I didn´t understand”, then the counts adds to 3 and goes to flow that asks for the contact informations.
I´d like to reset the counter when the this flow starts. Is it possible? Or when the counter reaches 3 or more.
I tried to create a filter where if counter += 3 then counter = 0, but it looks like it´s not working.

(Daniel Beckett) #6

It sounds like you wouldn’t need the filter. You can just set the attribute value to 0 when the other flow starts.

If that’s not working could you please share a screenshot showing how your attribute is setup in each flow?

Thanks,
Dan