Documentation Index
Fetch the complete documentation index at: https://docs.diga.io/llms.txt
Use this file to discover all available pages before exploring further.
What is the Diga Piece?
The Diga piece is the component that connects your workflows with your agent calls. It provides triggers to react to call events and actions to interact with Diga’s telephony system.Triggers
Start a workflow when a call event occurs
Actions
Execute operations within a running workflow
Triggers
Call Finished
Activates automatically when a call ends. This is the main trigger for post-call workflows.Data received
When this trigger fires, the workflow receives all call information:| Field | Description |
|---|---|
call_id | Unique call identifier |
status | Final call status |
duration | Duration in seconds |
type | Call type (inbound or outbound) |
end_reason | Reason the call ended |
phone_number | Contact’s phone number |
contact_id | Contact identifier |
agent_id | Agent identifier |
start_time | Start date and time |
end_time | End date and time |
dynamic_variables | Dynamic variables passed to the agent |
messages | Complete message history (transcription) |
messages array includes:
role— Who spoke (userorassistant)content— The message textcreated_date— When it was sent
Configuration
This trigger requires no additional configuration. You just need to assign the workflow to an agent for it to activate.Function Call
Activates during a call when the agent decides to execute a function. This is the trigger for during-call workflows. The agent uses it as another tool, similar to integrations.Configuration
| Field | Description |
|---|---|
| Function description | Natural language instruction telling the agent when to use this function. Example: “Use this function when the user wants to check appointment availability” |
| Parameters | Data the agent should extract from the conversation. For each parameter you define: name, data type, whether it’s required, and a description |
| Execution mode | Synchronous or asynchronous (see below) |
| User confirmation | Whether the agent should ask for confirmation before executing |
Parameters
Parameters define what information the agent extracts from the conversation to send to the workflow. For example, for a “Check availability” workflow:| Parameter | Type | Required | Description |
|---|---|---|---|
date | Text | Yes | The date to check availability for |
service | Text | No | The type of service requested |
Data received
| Field | Description |
|---|---|
call_id | Identifier of the ongoing call |
function_name | Name of the executed function |
arguments | Parameters extracted by the agent |
agent_id | Agent identifier |
contact_id | Contact identifier |
dynamic_variables | Dynamic variables from the call |
timestamp | Execution timestamp |
Synchronous vs Asynchronous Mode
Synchronous mode
Synchronous mode
The agent waits for the workflow to finish and receives the response. Use this when the agent needs the information to continue the conversation.Example: Check appointment availability. The agent asks for the date, executes the workflow, waits for the response, and tells the user the available time slots.Important: In synchronous mode, the workflow must include the Return Response action as the last step to send data back to the agent. The maximum wait time is 60 seconds.
Asynchronous mode
Asynchronous mode
The agent doesn’t wait for the response and continues the conversation. Use this for actions where you don’t need an immediate response.Example: Log an incident in a ticketing system. The agent confirms to the user that it’s been logged and continues, without waiting for the workflow to complete all actions.
User confirmation
When you enable user confirmation, the agent explains to the user what action it’s about to perform and asks for confirmation before executing the workflow. This is useful for sensitive actions like processing payments or making bookings. Example conversation:Actions
Make Call
Initiates an outbound call from a workflow. This action turns any workflow into a call trigger, allowing you to create automated campaigns or calls reactive to external events.Configuration
| Field | Description |
|---|---|
| From number | The Diga phone number the call will be made from. Selected from your project’s available numbers |
| To number | The number to call. Can be a fixed or dynamic value (data from a previous step) |
| Agent version | The agent version that will handle the call (optional) |
| Dynamic variables | Variables to pass to the agent during the call (optional) |
Use cases
Lead follow-up
Lead follow-up
Connect a CRM trigger (new lead created) with the Make Call action to automatically contact new leads.
Appointment reminders
Appointment reminders
Use a schedule trigger to call clients and remind them of their appointments.
Post-form calls
Post-form calls
Connect a webhook with the Make Call action to contact users who complete a web form.
Return Response
Returns data to the agent during a call. This action is required in during-call workflows with synchronous mode. It’s the last step of the workflow and contains the information the agent needs to continue the conversation.Configuration
| Field | Description |
|---|---|
| Response type | JSON or plain text |
| Content | The data to return. Can include data from previous steps |
Example
A workflow that checks appointment availability:Referencing Data Between Steps
In any action, you can use data from previous steps. Click on an input field to see the available data from all previous steps. Reference examples:- Trigger data: transcription, duration, function parameters
- Previous action data: API response, query result
Next Steps
Create workflows
Put these triggers and actions into practice by creating your first workflow.
Assign to agents
Connect your workflows with agents to activate them.
Templates
Use templates that already include the Diga piece configured.
Integrations
Compare workflows with direct integrations in the agent.