Scott Smith
Scott Smith

Reputation: 47

Twilio Autopilot - Alphanumeric Field Type Question

I created a simple example to collect information when someone types in something like: GIVE missions where GIVE is the task and missions is an example alphanumeric field value. When I test this, the value of the alphanumeric field gets truncated to the first letter and capitalized.

Simulator example

In the Train area I have this: Give {test_var} where test_var is type Twilio.ALPHANUMERIC

I would expect to get the whole value back and not just the first letter.

Upvotes: 0

Views: 342

Answers (1)

richiefeng
richiefeng

Reputation: 48

Twilio.ALPHANUMERIC follows the logic below:

  1. It skips normalization if the value is in uppercase and contains alphanumeric characters and no spaces. E.g. 123DJENJ
  2. It normalizes number utterances to digits. E.g. one two three -> 123
  3. It takes the initials of word segments that do not satisfy the first criteria. E.g. alpha beta charlie 12 -> ABC12
  4. It handles cases like yee as in echo -> E to boost the performance in voice channels.

We will improve our documentation on this. Thanks for bringing this up.

In your case, you might just need to define a custom field type for test_var to collect what you want. For custom field types, Autopilot won't do any extra post-processing.

Upvotes: 3

Related Questions