Number in words (any language)
The Number in words robot writes a number out in words in Bitrix24 (Alaio) business processes and robots: 10000 becomes "Diez mil", 2021 becomes "Two thousand twenty-one". Languages: English, Spanish, Portuguese, French, Italian, German, Polish and Turkish. You can add a currency word and write the cents as a fraction such as 75/100.
The robot is for invoices, contracts and cheques where the amount must also be written in words. The input is a number from a deal or invoice field, a language and, optionally, a currency word — for example pesos, euros or dollars. For languages with grammatical gender you can set the gender of the currency word so the number agrees with it: "veintiún pesos" but "veintiuna libras". The decimal part is written as a fraction such as 75/100, the usual format on cheques and invoices in many countries, or dropped. The number can use a dot or a comma as the decimal separator, and spaces between digit groups are accepted. It returns the full amount in words and, separately, the integer part in words. Use the result in a document template, an e-mail or a text field in the next steps of the process.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Number | string | yes | |
| Language | select | yes | en |
| Currency word (optional), e.g. pesos | string | — | |
| Gender of the currency word | select | — | masculine |
| Decimal part | select | — | auto |
What does the robot return?
| Parameter | Type |
|---|---|
| Number in words | string |
| Integer part in words | string |
| Success | bool |
| Error | string |
What errors can the robot return?
The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.
- Could not read the number "{raw}"
- The number "{raw}" is too large: the integer part can have at most 15 digits
- Unknown language "{raw}"
Scenario: an invoice for a client in Mexico
- The deal amount is 10500.75
- The robot with language Spanish and currency word pesos returns "Diez mil quinientos pesos 75/100"
- The line goes into the Spanish invoice template