Actions and Metadata
This article describes conversation parameters that are saved in the conversation session and the actions that can be used to interact with the CRM.
Session Parameters
Ultimate’s systems make use of conversation session parameters. These parameters are used to store information about the visitor, the conversation, or any other topic that might be useful. These parameters can be used to personalize the dialogs or to use them in Actions. // TODO: Figure out the correct term “chatbot” Sessions parameters are distinct per conversation with the chatbot.
Using the metadata
field
Ultimate’s Chat API and Ticket API allow sending metadata to be stored as session parameters. A conversation might for example have a need to know the visitor’s email or order number.
The metadata
field can be sent to the API with any of the chat and ticket events.
Find more information in the conversation flow article about these events.
The parameters passed in the metadata
field will be stored in the conversation session
and can be used, for example, in the dialog, backend API integrations or actions.
What are Actions?
The CRM might have a need for ways to communicate with the systems of ultimate.ai. This is where actions come into the picture. Actions are a generic piece of communication that can encapsulate any custom functionality required. Some examples of what actions can be used for:
- The CRM has specific user-related data that the chatbot should be able to fetch to use in a conversation. An action can fetch this information from the CRM system.
- The chatbot needs to update information in the CRM. This could be adding an order number to a ticket, an email into the user data or some other conversation-related metadata. Actions can be created to send information from the conversation session.
- Adding internal notes to a ticket. It may be required to give more information to an agent during an escalation.
- Actions can be used to trigger any sort of macro in the CRM.
Where can we use them?
The triggering of actions is managed by the conversation design tools of Ultimate’s dashboard. Actions can be triggered in the following scenarios:
- In specific conversation-related events, for example, “Chat Started” or “Chat Escalated.”
- When an intent gets detected
- In a specific point of the dialog when the chatbot passes certain nodes
What is the output of it?
The actual outcome of the action is dependent on the implementation of the functionality on the CRMs side. The action will only provide the necessary timing and the data the implementation needs. Next, let’s consider how to set up an action.
How it works
Define Actions
Actions can be defined in the Custom CRMs section of the Ultimate’s Dashboard. We can then select the actions to be used.
Action response
The action execution could optionally return a response body of this format:
{ "results": [ { "key": "newBalance", "value": "1000" }, { "key": "status", "value": "active" }, { "key": "userEmail", "value": "user@mail.com", "sanitize": true } ]}
These parameters will be stored in the conversation metadata and can be used in the dialog, like for example, as other action parameters.