Custom integrations
Article dedicated to developers.
Custom Chat bots
Buzzeasy provides an easy to use interface to configure your own chat bot integration in the portal. This feature is currently limited to internal custom development teams as the Chat Bot Integration API and SDK are required for developing a custom chat bot.
A user is required to have the Integration business entity assigned to their profile in order to view and edit this section.
Upon navigating to the New Buzzeasy Portal > Integrations > Chat bots, a user will be presented with a list of existing custom bot, if no custom chat bot is created, then a user may click the +Create
button and follow the on-screen instructions.
- Provide a name for the Bot. This will be referenced in the Workflow.
- Provide the base url of your bot. This will then be used to create callback URLs automatically.
- Provide your API key.
- Enable/Disable typing notifications. If enabled, Buzzeasy will send and expect typing messages through the /typing callback URL.
- Bot Callback URLs. This section is read only, it provides information to the developer.
Additional configuration may be required. This will be partially provided by the Buzzeasy team.
"ChatBotIntegrationApi": {
"Authority": "Provided by Buzzeasy Team",
"BaseUrl": "Provided by Buzzeasy Team",
"ClientId": "Provided by Buzzeasy Team",
"ClientSecret": "Provided by Buzzeasy Team"
},
"ApiKey": "your API key",
"BotId": "Name of the custom bot"
Passing data to workflow through the widget
Buzzeasy's new Webchat widget allows website integrators to pass Workflow data through the widget.
The website can define the function "getDataForBuzzeasy" which will be called by Buzzeasy upon sending the first customer message.
Example integration code:
window.getDataForBuzzeasy = function(){
return Promise.resolve({
workflowData: {
"Key1": "Value1",
"Key2": "Value2"
}
customerData: {
firstName: string;
lastName: string;
email: string;
phone: string;
}
});
};
Using the Widget API to send messages
The website can leverage the Widget API to send custom Pre-Conversation messages based on the parameters that the website decides.
Here is a code example:
window.buzzeasyWebChat.sendProactiveMessage({type: 'PromotionalMessage', messageText: 'This is a test message from the client-side API', suggestedActions: ['Start!']})
The type can take the values PromotionalMessage, which is the equivalent of the Visible message from the Portal configuration or the InviteMessage which is the equivalent of the Badge-Only message.
Model:
buzzeasyWebChat.sendProactiveMessage(args: { type: 'InviteMessage' | 'PromotionalMessage'; messageText: string; suggestedActions: string[]; });
Content Manager API
Buzzeasy provides a Public API to retrieve conversation history based on the internal conversation ID. This can then be used to pass the conversation history to other systems.
Required to access the API, those will be provided by the Buzzeasy team:
- The endpoint.
- Credentials to generate a Bearer token used to authenticate.
Required parameters:
- Conversation ID (GUID)
Returned data example:
{
"id": "110b1f3c-b952-4023-9e80-3ecf9ed08b59",
"creationDate": "2022-08-10T12:59:29.2038395Z",
"conversationId": "be6bddecd0bb452ca71ae0906b107fb2",
"channelType": "2000010",
"from": "Bot",
"text": "Okay, we need your phone number to identify you.",
"attachments": [],
"suggestedActions": {
"to": null,
"actions": null
},
"tenantId": "<tenantID>"
},
{
"id": "4f4027f0c72f4565a205c931823c3446",
"creationDate": "2022-08-10T12:59:33.4188797Z",
"conversationId": "be6bddecd0bb452ca71ae0906b107fb2",
"channelType": "webchat",
"from": "Customer",
"text": "+",
"attachments": [],
"suggestedActions": null,
"tenantId": "<tenant ID>"
},