System entities

System entities are Chatlayer's built-in predefined entities that match a certain general pattern that is widely used.

You can think of system entities as match entities that are pre-made just because they fit regular, typical patterns that would be widely used inside bot conversations.

System entities tab.

Chatlayer.ai supports the following system entities:

Variable name

Example input by user

Example result in session

sys.email

"ilovebots@chatlayer.ai"

sys: {email: 'ilovebots@chatlayer.ai'}

sys.phone_number

"+32 487 23 02 03"

sys: {phone_number: '(+32) 487230203'}

sys.ordinal

"5th"

sys: {ordinal: '5'}

sys.amount_of_money

"5 euro"

sys: {amount_of money: '5', amount_of_money_currency: 'EUR'}

sys.distance

"5 kilometers"

sys: {distance: '5', distance_unit: 'kilometre'}

sys.number

"eighty eight"

sys: {number: '88'}

sys.quantity

"3 liters"

sys: {quantity: '3', quantity_unit: 'litre'}

sys.temperature

"80C"

sys: {temperature '80', temperature_unit: 'celsius'

sys.time

"3 pm tomorrow"

sys: {time: '2020-12-25T15:00:00.000+00:00', time_grain: 'hour'}

sys.url

sys: {url: 'www.chatlayer.ai/jobs', url_domain: 'chatlayer.ai'}

sys.duration

"3 hours"

sys: {duration: '3', duration_unit: 'hour', duration_normalized: '10800', duration_normalized_unit: 'second'}

You should never overwrite System Entities yourself – they are automatically overwritten by the last detected variable (if any values are detected). So instead, save the System Entity to a variable of your own choosing outside the sys or internal namespaces.

Use system entities

To use system entities in your bot:

  1. Create a Collect input block. For instance, make it as a block that asks for the user email.

  2. Under Capture use response as, scroll down until you find the list of System entities.

  3. Select the system entity of your choice. For this example, we would select @sys.email.

Select a system entity.
  1. Under Save variable as, choose a variable to store the entity value.

Save the system entity value into a variable
  1. Click Save.

Last updated