Supported activities and events
Here you will find 2 sets of supported activities (globally supported activities and partially supported activities).
Common activities across channels:
Specific activities for some channels:
Not all of these activities work on all channels. For example, Facebook only supports some activities. Whatsapp only supports basic text.
Facebook = Facebook Messenger Apple = Apple Messages for Business
Activities
The way how to send an activity varies depending on the type of chatbot:
Microsoft Bot Framework sends activities by using ChannelData
API chatbot sends activities to the API endpoint
/api/v1/Chatbot/{chatbotId}/activity
see Send activities.
GetAvailableOperators
This gets a list of operators that are logged in and available.
If the groupId
parameter is set, and a list of available operators from the selected group is returned.
Otherwise (groupId
isn't set), the routing conditions are re-evaluated and only a list of available operators from the groups that meet the conditions is returned. It is therefore possible to change the session parameters and get a list of available operators according to the current parameters.
Request JSON:
Response:
GetAvailableGroups
This gets a list of operator groups and their current status.
If the groupIds
field is defined, and a list of groups according to this field is returned.
Otherwise, the routing conditions are re-evaluated and a list of groups that meet the conditions is returned. It is therefore possible to change the session parameters and get a list of available operators according to the current parameters.
Group status can have these values:
ONLINE - a group has available operators
BUSY - all operators are busy but the group queue is not full
OFFLINE - group queue is full
In addition, when group is offline, the groupOfflineReasons array is populated with the following values:
BUSINESS_HOURS - the group is outside configured business hours
NO_OPERATORS - there are logged-in operators in the group
QUEUE_FULL - the group has reached the maximum configured queue size
DELETED - the group was deleted by an administrator
CHANNEL_BLOCKED - all operators have blocked the given channel
Request JSON:
Response:
groupWorkload
maxSlots: Sum of all slots of logged operators in group
usedSlotsWaiting: Sum of all waiting slots of logged operators in group
usedSlotsAccepted: Sum of all accepted slots of logged operators in group
freeSlots: Sum of free slots of logged operators in group
queueWorkload
freeQueueSlotsCountTotal: Free queue slots of group
inQueueCountTotal: Used queue slots of group
isQueueFull: freeQueueSlotsCountTotal == 0
GetCallParams
Acquires CallParams associated with an active session.
Request JSON:
Response:
SetCallParams
Set CallParams to active session.
Request JSON:
Response:
SendGuestOfflineEmail
Sends an email to an address for messages from an offline form. The offline form has to be set on a widget level.
Request JSON:
GetGuestIdentity
Gets properties from client identity.
Request JSON:
Response:
Forward
Redirects interaction for a live operator. Either operatorGroupId
or userId
must be set.
Forwarded sessions ignore configured capacity rules (group queue limit/operator slots. If this is not desirable either handle the capacity manually using GetAvailableOperators / GetAvailableGroups or use HandOff activity instead.
Routing parameters are not re-evaluated. If you want to route the session again (for example after changing the session parameters), you can use the HandOff activity.
Request JSON:
HandOff
This returns the interaction to routing and re-evaluates the session parameters. After calling this activity, the chatbot is disconnected from the session. Therefore, we recommend that you first determine the availability of target operators/groups using the GetAvailableOperators / GetAvailableGroups activities.
The result of the Handoff operation depends on the state of the group:
ONLINE - a session is assigned to an operator
BUSY - a session goes to the group queue
OFFLINE - an offline form is displayed to a client
It is necessary to set the routing conditions to avoid routing back to the chatbot.
Example of correct use:
Firstly, the chatbot is selected on the first routing because the HandoffReason is not set yet. Chatbot should set this parameter using the SetCallParams activity before returning the session to routing. This ensures that the session is not routed back to the chatbot.
EndConversation
It ends a session.
Typing
It displays/hides an "unfinished" message from a chatbot.
Request JSON:
DisableGuestInput
Hides the input field and allows typing into the chat for a client.
Request JSON:
Response:
EnableGuestInput
Displays the text input and allows typing into a chat for a client.
Request JSON:
Response:
GetHeroCards
Returns available Hero cards.
Request JSON:
Response:
GetHeroCardsResponse returns HeroCards that can be used in the current session only.
SendHeroCard
Send selected hero card to client chat. To set predefined values in a HeroCard you can use object initialParams.
Examples:
If you want to send a hero card with a text field that sets values in the call parameter "call_param_fullname", initialParams should look like the following:
If you wish to send a hero card with a time picker ranging from 6th of December 2021 2:00 pm to 2:30 pm and from 7th of December 2021 8:00 am to 9:00 am and store the selected value to call parameter "call_param_time_picker", initialParams should look like the following (using military time):
If you want to send a WhatsApp HeroCard with params, additional params should look like this:
Note that you should not change the header, buttons, footer, and body names, just add or remove values in an array. If you don't have any parameters in section, send an empty array.
Request JSON:
Response:
Until recently, the chatbot was unable to detect that a Hero Card confirmation had occurred by the client and was reliant on tracking the session parameter change. This is no longer necessary as confirmation information can be obtained via webhook.
HeroCardSubmission
Information for the chatbot that the client has confirmed the Hero Card or selected one of the options (applies to WhatsApp).
ChatbotOpenFileUploadPrompt
Opens a dialog box to allow the user to upload the file.
Request JSON:
Response:
EnableGuestUpload
Enable functions that allow user file upload.
Request JSON:
Response:
DisableGuestUpload
Disable functions that allow user file upload.
Request JSON:
Response:
GetMediaObjects
Gets a list of files stored in mluvii and available for the given session.
Request JSON:
Response:
ObtainCrmIdentity
Returns a list of existing records from the Contacts Directory for which at least a minimum match is found in the client's identification data in the given session (e.g. client's name, phone number, e-mail, ...).
The behavior is identical to that of a session with a live operator, which receives information about matches found with existing records in the Contacts Directory.
Request JSON:
Response:
Often, the API will return multiple results and it will be up to you to select the most relevant record for the chatbot to assign a client identity. You can use the "score" parameter as a guide.
AssignCrmIdentity
It is used to assign a client identity to an existing or new entry in the Contact Directory. Typically you call this request based on the ObtainCrmIdentity result.
Request JSON:
Response:
Jestliže v odpovědi na activitu ObtainCrmIdentity dostanete záznamy s určitou shodou, použijete v requestu hodnotu parametru "crmIdentityID". Pokud žádné shody nejsou nalezeny, jako hodnotu parametru "crmIdentityId" použijete "null".
V odpovědi activity si můžete všimnout parametru "created", který nabývá hodnot "true" při vytváření nového záznamu a hodnoty "false" při napárování na existující záznam v Adresáři Kontaktů.
ShareFile
Send a file to chat. It can be done in two ways:
ShareFile (name)
a) Combination of GetMediaObjects, which is used to get a list of all files stored in Files /name + id). In the second step, you use the name of the specific file within the ShareFile activity.
Example: Request JSON using name parameter:
ShareFile (URL)
Using ShareFile activity with the URL of the particular file hosted externally.
Request JSON using URL parameter:
Response:
If you want to send a YouTube video URL to the chat, use the "message" type and put the URL in "text".
There are two ways of sending a file - either with GetMediaObjects using a name or you can use a URL link to the specified file.
Allowed file types
You can whitelist file types on the company level - this overview specifies which files are working in which channel. For example, sending and playing MP3 files is working for WhatsApp but not for Facebook sessions.
Adaptive cards
Our API supports https://adaptivecards.io standard for message formatting.
Example of a carousel adaptive card:
Buttons
Buttons can be sent using adaptive cards.
Request JSON:
The response to the selected button (Button 2) is then a Text activity in the following format:
Events
Incoming Message
When a guest sends a text message to a chat, the following activity comes at the callback url:
Incoming File
If a guest uploads the file using a paper clip in the chat input, the following Activity comes to a bot in the following format.
Last updated