It's impossible to use bot in Draft mode when retrieving custom properties from Freshchat
We have an integration with Freshchat, and we use the Freshchat messenger in our products. We utilise 'custom properties', so data like name and email are captured by the Freshchat messenger, then relayed to Chatlayer.
To capture the custom properties, the first thing in our Chatlayer flow is an action for our Freshchat integration to 'Retrieve user information':

When we are building our bot, this is also the first action that runs in debug mode. Because debug is done through the Chatlayer widget and not through the Freshchat messenger, this action will throw an error (as internal.sessionID doesn't exist).

This makes it harder for us to build and test our bot, as it's not the same flow for our production environment, and the flow just stops.
We can make it work if we 'hardcode' the user ID to something known. The issue here is that it's a great risk to hardcode this, as the user ID might end up being published. The consequence is that all customers will be appointed the custom user ID in production.
Is there a way to mitigate the error, and make sure the flow works in debug mode? Either the action can have specific behaviour in debug mode, like a different user ID field only used in debug. Or if we can recognise where the error comes from, we can create a different flow for it: in case of error with this action, go to dialog x.
Please sign in to leave a comment.
Comments
0 comments