Teneo Developers

Currency Conversion

The Currency Conversion solution contains an example flow to convert one currency to another.

coins

Core concepts

  • Slot filling
  • Number recognition
  • Integration
  • Listeners

Example conversations

User: Can you convert currencies?
Bot: Which currency would you like to convert from?

User: Dollars
Bot: To which currency would you like to convert USD?

User: Euro
Bot: 1.00 USD is worth 0.85 EUR.

User: Can you convert to zloty?
Bot: Which currency would you like to convert from?

User: SEK
Bot: 1.00 SEK is worth 0.45 PLN.

User: 15 euro in canadian dollars
Bot: 15.00 EUR is worth 22.20 CAD.

User: 5 pounds
Bot: To which currency would you like to convert GBP?

User: Yen
Bot: 5.00 GBP is worth 760.20 JPY.

Solution components

This solution contains the following components:

NameTypeDescription
Currency ConversionFolderFolder with subfolders for the flows and language objects in this solution.
Convert CurrencyFlowSlot filling flow. Allows user to specify currency to convert from, currency to convert to and an optional amount. Stored in the Currency Conversion > Flows folder.
MAIN_CURRENCIES_WITH_VARIABLES.ENTITYEntityEntity containing currencies and their currency code. If during testing you find a particular currency which is not recognized, you can add it here.
Convert Currency IntegrationIntegrationIntegration to convert currencies.
Currency Conversion Syntax TriggersOrder groupOrder group which contains the syntax triggers for this solution.

Make sure you check for possible conflicts before you import this solution into an existing solution (merge solutions).

Dependencies

To convert currencies, the solution contains an integration which uses exchangerate-api.com. The exchange rate data is updated once every 24 hours.

Download

  1. Download the solution here.
  2. Import the solution into Teneo studio. See How to import solutions for more details.
  3. Once the solution has been imported, please make sure to assign the Lexical Resources called 'Teneo Lexical Resource English'.