The purpose of this adapter is to create a ticket in the Benti module. It can be used with the NL Escalation Adapter in order to create a ticket when there are no agents available.
This adapter is included in the Chatbot SDK to facilitate the steps to create a ticket in the Benti module. It is available from version 1.68.2.
The adapter does the following actions:
createTicket
action is executed.In order to use the adapter you need to add it to the adapters array:
adapters: [
SDKInbentaCreateTicketAdapter.build(bentiConfig),
]
See the configuration parameters to be passed to the build
function:
apiKey
(string): API key from the Benti instance to create the ticket.domainKey
(string): Domain key from the Benti instance to create the ticket.queue
(function): The queue where the ticket will be created.source
(function) [optional]: The source ID of the ticket.classifications
(array) [optional]: Array with the classifications IDs (Example: classifications: [1,4,6]
)importBotHistory
(boolean) [optional]: Whether to import the chatbot previous conversation transcript into the ticket or not. The number of messages is limited to 150. Is set to true
by default.Benti configuration object example:
const bentiConfig = {
apiKey: '*********',
domainKey: '**********',
queue: function() {
return 1;
},
source: function() {
return 2;
},
classifications: [4,6],
importBotHistory: true,
};
The following example shows how to initialize the SDK with this adapter:
<script>
const authorization = {
domainKey: <chatbot_domain_key>,
inbentaKey: <chatbot_api_key>,
};
const createTicketConfig = {
apiKey: <benti_api_key>,
domainKey: <benti_domain_key>,
queue: function() {
return 1;
},
source: function() {
return 2;
},
classifications: [4,6],
importBotHistory: true,
};
InbentaChatbotSDK.buildWithDomainCredentials(authorization, {
adapters: [
SDKInbentaCreateTicketAdapter.build(createTicketConfig)
]
});
</script>