In this How-To, we will explore a scenario in a Banking Bot, where Bot Functions can be used to reuse a piece of functionality. We will see how the expenditure report can be programmed as a function and can be used for both Savings Account and Credit Card.
For details on what Bot Functions are and how they are implemented in the Kore.ai Bots platform, refer here.
Problem Statement
In our Banking Bot, we have a reporting task:
- Monthtly Statement which gives the monthly balance amounts for a given Account number.
- Credit Card Statement gives an overview of the expenses for a given Credit Card.
- Both the reports are presented as pie chart and the input in both the cases is an array with month, amount values.
In this document, we will see how Bot Function can be used to avoid duplication of coding effort and ensure uniform presentation.