Docs »

Bots »

Interactions »

Prompts »

Formatting

You can format a user’s response to a prompt before validating or saving it.

The formatting template has access to all of Cerb’s scripting functionality.

Format a number

This formats a number, removing thousands separators and decimal places:



{{message|replace({',':''})|number_format(0, '.', '')}}


Format a date as a Unix timestamp



{{message|date('U')}}