ForumCategory: BotsCollecting Customer Data with a Bot
RoLYroLLs asked 49 years ago

Hello for the past several days I’ve had trouble finding a solution for this and hope I can get help here.

I’ve currently successfully deployed the messaging bot sample ( running the agent.js on an Azure App Service on Linux with Node.js v10+. The account logged in with is hooked up to an SMS number where customers can text codes and we call our internal RESTful API to grab data about them based on their phone number. All this is working fine.

However, if we do not find their data based on the number being texted from, we want to ask for their first name, last name, and email and search for them with that info, otherwise transfer them to a live agent or whatever process(es) we decide. Currently, as I develop this, I’m accomplishing this by creating a local variable and storing the collected data per event.dialogId (similar to how bot.js handles this.myConversations).

The trouble I’m having is how to properly collect data from the customer (like first name, last name, and email)? Optionally, store that as part of their LiveEngage profile, beneficial but not required. I’m thinking of using a cache server (Redis, etc) to keep the data for a certain amount of time but not sure if this is efficient or possible with a bot. As mentioned above I’d like to store this on their LiveEngage profile or whatever other features offered.

Any help to point me in the right direction would be greatly appreciated.