Smooch: get the `extracted_data` returned by Motion.ai bot

116 views Asked by At

I am using Smooch with a Motion.ai chat bot. The chat bot has the ability to extract machine readable data from a user's response, e.g. telephone numbers and email addresses. This extracted_data is included in the payload if you set up a webhook with Motion.ai. It is also included if you interact with the Motion.ai bot via it's API. Since I assume Smooch connects to motion.ai bot via the latter's API, is it possible to retrieve that extracted_data somehow and store it as part of the properties for an app user in the Smooch database. As far as I can see it is not stored in the Smooch database as part of the message object.

1

There are 1 answers

0
jpjoyal On

Motion.ai is actually the one that calls the Smooch API. They could use the Update appUser API to add the extracted_data inside the appUser properties.

Alternatively, you might be able to setup a Motion.ai webhook to receive the replyData and call the Smooch API given that the recipient info given by motion.ai can be mapped to a smooch appUser.