Concept
TheTYPE of a field decides how the runtime reads and checks the customer’s words. A date field turns “next Friday” into an ISO date. A number field turns “twenty five” into 25. A free text field keeps what the customer said.
An unknown type compiles and passes the value through with no check. Check the spelling of each type.
Minimal working example
An events agent collects a future date, a guest count, a budget, a city, and optional notes.- All five variables are
GATHERfields that the customer supplies. - The notes field is optional and can be empty in the reply.
How it works
Dates:- A date value is normalized to an ISO date, such as
2026-12-05. An ISO date passes through unchanged. Relative phrases, such as “next Friday” and “in two weeks”, resolve from the conversation date and time zone. SEMANTICStemporal: futurerejects a date before today and moves a date without a year forward.pastrejects a future date.anyis the default. The rejection reason codes aredate_not_in_futureanddate_not_in_past.temporaltakes effect ondateanddatetimefields. Another value compiles but has no effect.- A
datetimefield returns the date only, in the sameYYYY-MM-DDform asdate. The parser drops a time of day in the customer’s words, so “tomorrow at 3pm” gives tomorrow’s date. A value that already starts with aYYYY-MM-DDdate passes through unchanged, with any time part the customer typed. A value that does not start with a date but that a standard date parser accepts also passes through as typed. To collect a time, add a separatestringfield with aVALIDATErule for the format you need.
- The runtime reads spoken numbers when at least one field in the agent is numeric. A field of type
number,integer,float,phone, orcurrencyturns this on. - A value like “8,5” is refused.
- A currency symbol or code is removed. Collect the currency code in a separate field when it matters.
locationandfree_textkeep the text as it was said. SetlookupinSEMANTICSto check a place against a list. See Normalize user language into canonical values.- To extract a structured address, use separate fields for the street, the city, and the postal code. The
componentssetting only guides the model. It does not create an object.
- The conversation locale sets the default country for phone numbers and the date reading.
invalid_number, invalid_date, invalid_phone, invalid_currency, or invalid_option. The agent asks again, using the RETRY_PROMPT if you set one.
Common variations
Date in the past
Settemporal: past for a birth date or an incident date.
Phone and email with a limited strategy
SetTYPE: phone or TYPE: email. Set STRATEGY: pattern to extract with the built-in pattern and skip the model.
Range of numbers or dates
AddRANGE: true to collect a low and a high end. See Collect lists, ranges, preferences, and attachments.
Free text for notes
Usefree_text with REQUIRED: false for a field you capture only when offered. A plain optional field is not extracted unless you set an extraction setting. See Collect required and optional fields from users.
Verification
- Run the validator. Expect no errors and no warnings.
- Say “a party of twenty five in Lisbon on the first of next month, budget 8000 euros”. Expect
guestsas 25,venue_cityasLisbon,budgetas 8000, and an ISO date. - Say a past date for the event. Expect it to be refused, and the agent to ask again.
- Say “8,5 guests”. Expect the value to be refused.
- In the trace, open the extraction resolution result. It lists the raw phrase and the normalized value.
Production readiness checklist
- Every type name is spelled correctly. An unknown type skips checks.
- Every date field sets
temporalwhen the direction matters. - Currency fields have a separate currency code field when the code matters.
- The conversation locale is tested for phone and date fields.
- Tests cover spoken numbers, relative dates, a past date, and a missing value.
- Free text fields are optional, or have a retry rule.
Common mistakes
Troubleshooting
Related articles: