...
Approach: Configure a skill in the Bot to reimburse the bill. The skill initially asks the user to upload the invoice. The attachment which is the uploaded invoice is now sent to OCR REST API to collect all the required information like invoice id, amount, dates, and all other relevant informationand invoice date. A confirmation request is sent to the user on the identified information from the invoice document. Upon approval from the user, the reimbursement request is sent with the invoice details and attachment of the invoice in the create service request.
The following are the key steps in creating the ticket in ISM by a Support Agent for an end-user:a Skill for attachment support.
Table of Contents |
---|
Define Attribute
Create an attribute Attachment to get the invoice/bill from the end-user on the channel.
On Skill Builder--> Attribute tab, click on Create Attribute.
Add attribute details such with Name as Name Attachment and Data typeDatatype FILE.
Set the prompt message to be displayed to the end-user, like “Please attach your bill invoice here“
Click Save.
Follow the above steps and create the below attributes:
‘InvoiceID’ to store the unique ID number in the bill.
‘Date’ to store the numbers in the invoice date format in the bill.
‘Amount’ to store the total billed amount in the invoice.‘Bill Details
’ to store the values of InvoiceID, Date, and Amount in a single variable‘TicketID’ to store the ticket number created in ISM.
‘Confirmation’ to get confirmation from the user that the data received from OCR is correct. Set the prompt type to Quick Reply. Provide Yes and No as options.
Create an Integration
Define Integration to OCR with the “OCR REST API - OCR recognition” operation.
On the tenant menu, click on Integration.
Create an Application with the integration type as REST.
Add an instance /wiki/spaces/DOC/pages/1625227940to the OCR environment.
Configure the ‘OCR REST API - OCR recognition’ /wiki/spaces/DOC/pages/1625227940. Pass Attachment attribute to the Operation
Set the Global Header content type to multipart/form-data.
In Outbound payload → Attachment Mapping, set the external field to attribute Attachment.
Fetch the access tokeninvoice details received as a response from the web service and save it in a local attribute Invoice Details.
Set the invoice id to the ‘InvoiceID’ attribute.
Set the invoice date to the ‘Date’ attribute.
Set value of the amount to the ‘Amount’ attribute.
Follow the above steps and create the following integrations:
Select operation ‘Get bill information’ to get the values from the bill details for the user from OCR REST API. Fetch the bill details Define the operation ‘Create Service Request.' and pass the value in the “InvoiceID”, ”Date” and “Amount” attributes to the operation. Fetch the ticket number received as a response from the web service and save it in a local attribute bill information.
Select operation ‘Create Service Request.' Override the Integration and pass the value in the “bill information” form field to the operation. For more details on creating an integration, refer to Integration
Set the success message to be displayed on successful form submission. Use the local attribute TicketNumber to show the logged ticket number to theuser.For example; “Created ticket @{local.ticketIdentifier} in ISM for the submitted invoice“global attribute TicketID. You may also use the Operation created in the Analyst creating the ticket in ISM from Agent Chat Console and override it during Skill creation.
Define the operation ‘ISM Upload File' and pass the attachment saved in the “Attachment” and Ticket number in the “TicketID“ attribute to the operation.
Build a Skill
On Skill Builder --> → Create Skill tab, enter Skill details such as Skill Name, Category, Description, and KPI Metrics
Under Invocation type, add User Phrases such as ‘Fetch Invoice details‘Reimburse my bill,’ ‘Update with ‘Refund my bill details’
Under Conversation flow,
Add the attribute “Attachment” to upload the bill.
Add the Integration operation OCR REST API - OCR recognition to get the Invoice Details associated with the attachment.
Add the attribute Bill Details.Add the Integration operation Get bill information “Confirmation” attribute to get the details associated with the bill.
Add Information Message to display the values associated with the local attribute bill information. For example, “The values are Invoice ID:123456 Date:11/12/2020 Amount: 500”
Add a Ruleset to let the user decide if the obtained values are correct. Configure the following rules.
If bill information displayed to the user is as expected, continue with the next steps.
If bill information displayed to the user is improper, prompt the user that the details are incorrect and exit
confirmation from the user that the data received from the OCR integration is correct.
Add a Ruleset based on the confirmation received from the end-user. Add the following rules:
If confirmation from the user is Yes, continue with the Skill.
If confirmation from the user is No, display a message “Data extracted from the Invoice is incorrect. Please try reattaching the Invoice“ and Exit the skill.
Add the Integration operation Create Service Request to send the Bill Details to ISM in the local attribute bill information.Add Information Message to display ticket submission confirmation message . If using an existing operation, Override the operation to pass “InvoiceID”, ”Date”, and “Amount” attributes to the Operation. Fetch the ticket number received as a response from the web service and save it in a global attribute TicketID.
Add the Integration operation ISM Upload File. If using an existing operation, Override the operation to pass Attachment and TicketID attributes to the Operation.
Add an Information Message to confirm the ticket submission and display the ticket number to the end-user. For example, “Creating a ticket in ISM with Invoice details is completed for the user”“Created the ticket @{global.m_ism_ticket_id} in ISM”.
Click Save to finish building the skill.
The next step is to add permission to the skill. Click on Permission /wiki/spaces/DOC/pages/1676574776 and the Users or Groups who should be able to execute the Skill.
Run Build and Publish to make the skill available in the Virtual Agent.
Once the skill is Published, Go to the Test Widget to test the skill. Click on Debug Logs and execute the skill to view the runtime Skill execution logs.
Your action has now been created successfully, and Support Agents can execute the action on the Agent chat console.
Below is the sample skill definition. Note that the integration details should be replaced with your organization-specific instance details.
View file | ||
---|---|---|
|
Additional Resources
Visit the below Wiki Documentation for more information on:
Creating an Attribute on Create Global Attributes
Configure a 3rd party Web service integration on REST Integrations
Creating and Managing Skills is at Create Skills
Using local attribute in skills on Use Variables in Skills
Publishing Skill on Build and Publish
Understanding Conversation logs on Conversation History.
Using Transformation Functions: Random is at Transformation Function Random
Provide permissions to users or groups at Permission/wiki/spaces/DOC/pages/1676574776
Defining Rulesets on Using Rule Sets
Test your Skill on Test your Bot
Debugging skill on Debug Skills