The purpose of this adapter is to create a ticket in the Assist 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 Chat SDK to facilitate the steps to create a ticket in the Assist 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(assistConfig),
]
See the configuration parameters to be passed to the build
function:
apiKey
(string): API key from the Assist instance to create the ticket.domainKey
(string): Domain key from the Assist 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 Chat app's previous conversation transcript into the ticket or not. The number of messages is limited to 150. Is set to true
by default.Assist configuration object example:
const assistConfig = {
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: <assist_api_key>,
domainKey: <assist_domain_key>,
queue: function() {
return 1;
},
source: function() {
return 2;
},
classifications: [4,6],
importBotHistory: true,
};
InbentaChatbotSDK.buildWithDomainCredentials(authorization, {
adapters: [
SDKInbentaCreateTicketAdapter.build(createTicketConfig)
]
});
</script>