Skip to main content

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:
FieldDescription
call_idUnique call identifier
statusFinal call status
durationDuration in seconds
typeCall type (inbound or outbound)
end_reasonReason the call ended
phone_numberContact’s phone number
contact_idContact identifier
agent_idAgent identifier
start_timeStart date and time
end_timeEnd date and time
dynamic_variablesDynamic variables passed to the agent
messagesComplete message history (transcription)
Each message in the messages array includes:
  • role — Who spoke (user or assistant)
  • content — The message text
  • created_date — When it was sent
You can use any of these fields in your workflow actions. For example, insert the full transcription into an email or send the duration to a spreadsheet.

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

FieldDescription
Function descriptionNatural language instruction telling the agent when to use this function. Example: “Use this function when the user wants to check appointment availability”
ParametersData the agent should extract from the conversation. For each parameter you define: name, data type, whether it’s required, and a description
Execution modeSynchronous or asynchronous (see below)
User confirmationWhether 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:
ParameterTypeRequiredDescription
dateTextYesThe date to check availability for
serviceTextNoThe type of service requested
The agent automatically extracts these values from the conversation context and sends them to the workflow.

Data received

FieldDescription
call_idIdentifier of the ongoing call
function_nameName of the executed function
argumentsParameters extracted by the agent
agent_idAgent identifier
contact_idContact identifier
dynamic_variablesDynamic variables from the call
timestampExecution timestamp

Synchronous vs Asynchronous 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.
If the workflow takes more than 60 seconds or doesn’t include the Return Response action, the agent will receive an error and continue the conversation without the data.
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:
User: "I'd like to book an appointment for tomorrow at 10"
Agent: "Sure, I'll book an appointment for tomorrow Thursday at 10:00. Can you confirm?"
User: "Yes, go ahead"
Agent: [executes the workflow]

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

FieldDescription
From numberThe Diga phone number the call will be made from. Selected from your project’s available numbers
To numberThe number to call. Can be a fixed or dynamic value (data from a previous step)
Agent versionThe agent version that will handle the call (optional)
Dynamic variablesVariables to pass to the agent during the call (optional)

Use cases

Connect a CRM trigger (new lead created) with the Make Call action to automatically contact new leads.
Trigger: New lead in HubSpot
→ Action: Make call to lead's number
   - Agent: "Qualification agent"
   - Variables: lead name, source, product of interest
Use a schedule trigger to call clients and remind them of their appointments.
Trigger: Schedule (24h before each appointment)
→ Action: Look up next day's appointments
→ Action: Make call to each contact
   - Agent: "Reminder agent"
   - Variables: appointment date, service, address
Connect a webhook with the Make Call action to contact users who complete a web form.
Trigger: Webhook (form completed)
→ Action: Make call to form's phone number
   - Agent: "Sales agent"
   - Variables: name, email, inquiry

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

FieldDescription
Response typeJSON or plain text
ContentThe data to return. Can include data from previous steps

Example

A workflow that checks appointment availability:
Trigger: Function Call (parameters: date, service)
→ Action: Query calendar API (HTTP request)
→ Action: Return Response
   - Type: JSON
   - Content: { "slots": ["10:00", "11:30", "15:00"], "service": "General consultation" }
The agent receives this data and tells the user: “I have availability at 10:00, 11:30, and 15:00 for a general consultation. Which would you prefer?”

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
This lets you build workflows where information flows naturally from one step to the next.

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.