Overview
- When it runs: Before the agent speaks.
- Execution order: Multiple pre-call actions run sequentially in creation order.
- Variable scope: Variables created here are available through the entire interaction. Only variable values assigned in pre-call action can be used to personalize the Initial Message and Guidelines.
Only variables values assigned in Pre-Call Actions are available to Initial Message and Guidelines.
Create a Pre-Call Action
- Open Studio → Build → AI Agents → Actions tab → Pre-Call.
- Select “Create New Action” and fill in:
- Name: Short, descriptive identifier
- Description: What the action fetches and why
- Configure the request:
- Method: GET, POST, PUT, DELETE, PATCH
- URL: Static URL
- Query Params: Key–value pairs, variable-aware
- Headers: Static or variable-aware (e.g. auth tokens)
- Body: JSON request body for non-GET methods
- Auth Profile: Optional reusable credentials profile
- Click Send to test the request and preview the response (Data and Meta tabs).
- Map response fields to variables:
- Pick response paths to save into variables (e.g.
firstName,accountStatus). - These variables can be referenced as
{{firstName}}in Initial Message, Guidelines, and later actions.
- Pick response paths to save into variables (e.g.
- Save.
Response previews help you build a sample structure so you can reliably map fields to variables.
Best Practices
- Keep the number of pre-call requests minimal to reduce first-utterance latency.
- Prefer returning only the fields you need from your backend to simplify mapping.
- Use consistent, readable variable names (e.g.
customerFirstName,orderId).