...
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 with Name as Attachment and Datatype FILE.
Set the prompt message to be displayed to the end-user, like “Please attach your 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 invoice date in the bill.
‘Amount’ to store the total billed amount in the invoice.
‘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.
...
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 to the OCR environment.
Configure the ‘OCR REST API - OCR recognition’ Operation. 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 invoice details received as a response from the web service.
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:
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 global attribute TicketNumberTicketID. 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 ‘Reimburse my bill,’ ‘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 “Confirmation” attribute to get 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. If using an existing operation, Override the operation to pass “InvoiceID”, ”Date”, and “Amount” and Attachment attributes to the Operation. Fetch the ticket number received as a response from the web service and save it in a local attribute TicketNumberglobal 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, “Created the ticket @{local.ticketIdentifierglobal.m_ism_ticket_id} in ISM ISM”.
Click Save to finish building the skill.
The next step is to add permission to the skill. Click on Permission 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.
...