...
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 type as FILE.
Set the prompt message to be displayed to the end-user, like “Please attach your bill 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 DetailsConfirmation’ to store display the values of InvoiceID, Date, and Amount in a single variable.
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 to the OCR environment.
Configure the ‘OCR REST API - OCR recognition’ Operation.
Fetch the access tokeninvoice details received as a response from the web service and save it in a local attribute Invoice Details.
Assign the value obtained for invoice id to the ‘InvoiceID’ attribute.
Assign the value obtained for the date to the ‘Date’ attribute.
Assign the value obtained for 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 received as a response from the web service and save it in a local attribute bill information.
Select Define 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“InvoiceID”, ”Date”, “Amount” attributes to the operation.
Build a Skill
On Skill Builder--> Create Skilltab, 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 to get the details associated with the bill.
Add Information Message “Confirmation” attribute and add the message to attribute 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 the skill.
Add the Integration operation Create Service Request to send the Bill Details to ISM in the local attribute bill informationvalues in the “InvoiceID”, ”Date”, “Amount” attributes to ISM.
Add Information Message to display ticket submission confirmation message to the end-user. For example, “Creating a ticket in ISM with Invoice details is completed for the user”.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“
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 Logsand execute the skill to view the runtime Skill execution logs.
...