Configuring the Application from Care Console
Configure the application directly from the care console instead of making manual changes in android SDK by setting widgetId
in your android SDK.
In this guide, we provide information about how to set the widgetId
for your android SDK which will be embedded into your iOS application, and how to retrieve all the display conditions from the chat widget for your iOS SDK.
Using the widgetId
, you can configure your application to show the display conditions such as the number of available agents, business hours, and so on.
Set the widgetId
for your Android SDK
widgetId
for your Android SDKTo set the widgetId
for your android SDK, you need to add the widgetId
from the </> script
.
To get the widgetId
, you can select an existing widget or create a new widget configuration in the Care console.
Select Settings>Admin>Brand Messenger>Modern Chat.
Click on the </> Script button to get the script used in the Web android SDK. You will find the widgetId
in that script.
Implement the below code to set the widgetId
into your application for your iOS SDK.
BrandMessengerManager.setWidgetId("<WIDGET-ID>")
Retrieve all the Display Conditions from the Chat Widget Configuration
Implement the below code to retrieve all the display conditions from your chat widget.
BrandMessengerManager.getAllDisplayConditions(context, displayConditionsCallBack);
Know whether all the Display Conditions are Met
Implement the below code to know whether all the display conditions are met for your chat widget.
BrandMessengerManager.isAllDisplayConditionsMet(context, displayConditionsMetCallback);
Turn Off the Chat Widget
If you want to make the chat widget unavailable to your customers, you can pause or turn it off directly from the care console.
Implement the below code to retrieve the pause all flags from the care console in your mobile application.
BrandMessengerManager.isWidgetHashEnabled(context, widgetHashEnabledCallback);
Additional Way to Initialize
BrandMessenger initialization can be done with a widget id as given below:
BrandMessengerManager.init(context, "company-key", "", "some-widget-id", new KBMCallback() {
@Override
public void onSuccess(Object response) {
// on successful initialization, you can call login here
}
@Override
public void onError(Object error) {
}
});
Updated 2 months ago