Identify new user or existent user by bot flow

im need a way that, when a customer sends a message by whatsapp or by chat, the bot flow, identify if thats a new user or if its a existent user.

@luca.silbernagel
Good Day!
I hope you are able to get the mobile number of that user,
with that, you can try filtering with list agents filter, eg: /api/v2/agents?mobile=7654367287
and you will get the response and check for the last_login_at
assuming that if he is a new user then he didn’t log in to the portal so it will be empty.

Hope it helps :slight_smile:

Thanks

1 Like

@luca.silbernagel When a customer raises a support ticket through any channel, a ticket is created and mapped with their contact information. If a contact already exists in Freshdesk for them, it is rightly mapped to it. If it doesn’t, a new contact is created and mapped to it.

I hope the bot flow will have access to the requester_id attribute of the ticket when a message is received from a customer. The terminology of the customer, user, requester, and contact are all the same.

The contact information of the customer can be fetched with the View Contact API with the requester_id and checked the created_at time of the entry to check how recent the contact was created.

Let us know if it works out.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.