Allows developers to initialize the widget with a payload

This callback method allows developers to pass a payload that can be used to append additional data to all chat threads initiated from the widgets. These key-value pairs being passed in the payload need to be configured as custom chat fields on Webex Engage's Client Admin console.

var data = '{"custom_chat_fields": {"Load ID": "123456789"}}';
imichatwidget.init(data, function(response){
  //do anything here
});

Please note that this SDK doesn't throw an error if at all the keys provided are not found in the configured list on the client admin console.

📘

Note

Please note that calling the init method more than once results in similar behavior to the update method. This will not result in updating the metadata associated with previous chats initiated from the widget