When you use Freshchat as your customer-facing widget, your customer will first see Topics. Topics are specific messaging channels that your customers can use to connect to your team. Depending on the Topic, you can offer specific support. If you’re using bots, you can trigger a different bot flow for each Topic. If you have multiple Whatsapp numbers connected to your Freshchat account, you can even set up unique bot flows for each of these numbers.


When you’re using Freshchat BYOB, you can have only one bot connected to your Freshchat at account at a given point in time. You can build the bot flows for the different topics and Whatsapp numbers in the same bot, and use conditional logic to trigger the relevant bot conversations to your customers.


TABLE OF CONTENTS


Setting up the API




 

Setting up the conditional logic





Getting the channel IDs from Freshchat

Setting up the conditional logic

  • Go back to the bot that you were setting up in Freddy Self-service. Open the flow where you configured the Trigger API action, and switch to the Conditions.
  • Here, you need to configure a condition that will check the channel ID returned by the API call, in our case, the response parameter from the Fetch Source API. 
  • In the Conditions tab, set up a rule so that the bot detects the channel ID or the Topic where the customer has initiated the conversation and trigger the appropriate bot flow. 


  • Once it has the channel ID, it will look for a match with the list of channel IDs from Freshchat . If the channel ID returned from the API call is found to be equal to a channel ID associated with a topic, the condition will route the bot flow to that Topic.


  • In our example, the Freshchat account has two topics: Sales and Support. Based on which Topic the customer initiates a conversation from, the bot will trigger different flows.