# Business Logic

To make our AI actually perform a transfer, we'll need to incorporate some business logic. Business Logic is any arbitrary logic or code you may want your AI to execute during the course of all the different conversations it could have. In our case, we want to be able to support getting someone's balance and transferring some amount from one account to another.

Note: All code examples are written in JavaScript based on this app (opens new window). The location of the file is commented at the top. Feel free to explore this repo if you prefer to look at some actual code before getting into the concepts.

# Setting up Business Logic

  1. Before we can build any business logic, we first have to tell the AI that the get_balance and account_transfer competencies will want to use it. To do this, navigate to the settings page by hovering of the Gear Icon in the upper right hand corner of the top navigation bar, and then click on "Settings".

  2. The next step is to enter in the Business Logic Server Webhook URL: https://clinc-bizlo.herokuapp.com/api/v1/clinc.

  3. Next, we will select the two competencies we want to use business logic, so check account_transfer and get_balance.

  4. Click on "Save Settings" to save our settings.

    Save Webhook

# Additional Resources

  • Check out the advanced business logic section to learn how to configure your business logic server with the Clinc Platform.