Extractors
Extract data after each call in a structured format
Extractors enable you to gather structured data after each call. You can then use this data to interface with your own systems or track performance over time. For example, in our quickstart guide’s Restaurant Ordering Agent, we use extractors to gather the customer’s name and order in a consistent format, which we can then use to e.g. hit a point-of-sale system’s API reliably.
While you can view all extractor results in the UI, you can also use the Dial Extractor webhook to send the data to your own systems after each call.
Creating an Extractor
To create an extractor, navigate to your agent’s Extractor tab. Click the Create New Version dropdown to start defining a new extractor configuration.
General Settings
Each extractor version needs a name that will be used to identify it in the UI.
Extraction Fields
Extraction fields define the schema of data you want to capture from each call. To add a field:
Add a new field
Click the Add Field button
Name the field
Provide a name for the field
Select field type
Select the field type from the following options:
- Text: For string values
- Integer: For whole numbers
- Float: For decimal numbers
- Boolean: For true/false values
- Custom: For complex or nested data structures (e.g. JSON objects)
Configure nullability
Toggle Nullable if the field is optional
Add description
Add a description to document the field’s purpose; this aids our extraction model in understanding the data you’re trying to capture in this field
If you’re using the Custom field type to capture a JSON object, we recommend adding a description to each field within the object.
Testing Extractors
You can test new extractor versions on past dials before deploying them. Once your extractor has been created:
Click Test
Make sure that you’ve created your extractor by hitting Save; if you’re still on the extractor creation page, the Test button will not appear
Select Version
Select the extractor version that you’d like to test
Select Dial
Provide the Dial ID of the dial that you’d like to test against (check out the Dial History section to learn about browsing past dials)
Run Extractor
Click Test to run the extractor on this dial. It may take a few seconds to complete.
Managing Versions
Each extractor configuration is version-controlled. You can:
- Create new versions to iterate on your extraction schema
- Make a version the default by clicking Make Default
- Test different versions to ensure they work as expected
- View when versions were created and last updated
If you’re rolling out a new extractor version, double-check that it’s set as the default version.
Best Practices
- Give fields clear, descriptive names that reflect their purpose
- Use appropriate field types to ensure data consistency
- Add descriptions to document what each field represents
- Test extractors thoroughly before making them the default version
- Consider making fields nullable if they might not always be available. This prevents inconsistent empty value formats.
Technical Details
Each extractor has a unique ID that can be used to reference it in your integration code. You can find this ID in the General section of your extractor configuration.