Configure ChatBot
To configure the chatbot in your app, use the following code snippet. This also provides you with a callback or response if you want to redirect the user to a specific page in your application.
NotifyVisitorsApi.getInstance(activityContext).startChatBot(screenName (String), new OnNotifyBotClickListener() {
@Override
public void onInAppRedirection(JSONObject data) {
//do your work here
}
});
Below is the sample output,
{
"pageToLoad":"MainActivity",
"parameters":{
"key1":"value1",
"key2":"value2",
"utm_source":"notifyvisitors",
"utm_medium":"chatbot",
"utm_campaign":"Story_"
}
}
In the above function, you need to pass an attribute screenName, which you have set in the NotifyVisitors panel.
NOTE :- ‘screenName’ parameter is mandatory to run ChatBot.
Some sample screenshots of the default UI of the chatbot-

Updated 6 months ago