> ## 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.

# Introduction to Integrations

> Connect your agents with external systems to perform actions during phone calls

## What are Integrations?

Integrations allow your phone agents to connect with external systems during conversations. Instead of manually programming each API call, you define reusable **tools** that your agents can use when needed.

For example, a support agent can:

* Look up customer information in your CRM
* Create tickets in your management system
* Process returns in your payment platform
* Check inventory in your database

All of this happens in real-time during the phone conversation, without the user having to wait.

<Note>
  Integrations are optional. You can create agents that only converse without performing external actions. Use them when you need your agent to **do something** besides talking.
</Note>

## Common Use Cases

Integrations elevate your agents' capabilities across multiple cases:

**Customer Service**

* Look up customer information in CRM
* Check order status
* Create support tickets

**Sales and Commerce**

* Check product availability
* Verify prices and discounts
* Process orders

**Financial Services**

* Check account balances
* Verify transactions
* Process refunds

## Key Concepts

### Tools

A **tool** is a specific action your agent can perform. Examples:

* `search_customer` - Searches for a customer by phone or email
* `create_ticket` - Creates a support ticket
* `check_inventory` - Verifies product availability
* `process_refund` - Initiates a return

Each tool has:

* **Name**: Unique identifier (e.g., `search_customer`)
* **Description**: Explains when to use it
* **Parameters**: Information it needs (e.g., phone number, email)

### Integrations

An **integration** is a container that groups related tools and manages the connection with an external system.

For example, a "Zendesk" integration could include:

* `search_customer`
* `create_ticket`
* `update_ticket`
* `check_ticket_status`

Integrations also store the credentials (API keys, tokens) needed to authenticate with the external system.

## How Integrations Work During a Call

When a user is on a call with your agent, it can use assigned tools to perform actions in real-time:

<Steps>
  <Step title="The user requests something">
    The user makes a request during the conversation (e.g., "What's the status of my order 12345?")
  </Step>

  <Step title="The agent identifies the need">
    The agent recognizes it needs to use a tool to respond (e.g., `check_order`)
  </Step>

  <Step title="The agent calls the tool">
    The agent executes the tool with the necessary parameters (e.g., `order_id=12345`)
  </Step>

  <Step title="The external system responds">
    The integration queries the external system and returns the data to the agent
  </Step>

  <Step title="The agent responds to the user">
    The agent uses the received information to give a clear response (e.g., "Your order is on its way and should arrive tomorrow")
  </Step>
</Steps>

All of this happens in seconds, without the user having to wait or be transferred.

## Types of Integrations

Diga supports two types of integrations:

<CardGroup cols={2}>
  <Card title="HTTP" icon="https://mintcdn.com/diga/8ytXWoW-xL71V8MR/icons/dataflow-02.svg?fit=max&auto=format&n=8ytXWoW-xL71V8MR&q=85&s=5b2fa11c7642dae0aa1280581c82ad03" href="/en/build/integrations/http-integrations" width="24" height="24" data-path="icons/dataflow-02.svg">
    You create tools manually by defining endpoints, parameters, and authentication. It's the most flexible option.
  </Card>

  <Card title="MCP (Model Context Protocol)" icon="https://mintcdn.com/diga/8ytXWoW-xL71V8MR/icons/mcp-server.svg?fit=max&auto=format&n=8ytXWoW-xL71V8MR&q=85&s=15825793b9562caed3a976ea28f736ae" href="/en/build/integrations/mcp-integrations" width="24" height="24" data-path="icons/mcp-server.svg">
    Tools are automatically synced from the server. The provider manages updates.
  </Card>
</CardGroup>

## User Confirmation

For sensitive actions (like processing payments or deleting data), you can require **explicit user confirmation** before executing a tool.

When you configure user confirmation, the agent:

1. Explains what action it's going to perform
2. Asks for user confirmation ("Do you confirm you want to process the \$50 refund?")
3. Waits for an affirmative response
4. Only then executes the tool

This adds a layer of security for critical operations.

<Tip>
  **Recommendation**: Enable user confirmation for any tool that could have important or irreversible consequences.
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Create HTTP Integration" icon="https://mintcdn.com/diga/8ytXWoW-xL71V8MR/icons/dataflow-02.svg?fit=max&auto=format&n=8ytXWoW-xL71V8MR&q=85&s=5b2fa11c7642dae0aa1280581c82ad03" href="/en/build/integrations/http-integrations" width="24" height="24" data-path="icons/dataflow-02.svg">
    Step-by-step guide to connect any REST API to your agents.
  </Card>

  <Card title="Create MCP Integration" icon="https://mintcdn.com/diga/8ytXWoW-xL71V8MR/icons/dataflow-03.svg?fit=max&auto=format&n=8ytXWoW-xL71V8MR&q=85&s=be8078a61eee851e8af2f6f116b706be" href="/en/build/integrations/mcp-integrations" width="24" height="24" data-path="icons/dataflow-03.svg">
    Learn how to automatically sync tools from MCP servers.
  </Card>

  <Card title="Assign Integrations to Agents" icon="https://mintcdn.com/diga/8ytXWoW-xL71V8MR/icons/file-attachment-02.svg?fit=max&auto=format&n=8ytXWoW-xL71V8MR&q=85&s=647ad3346bd09961bf32ee567ce72ed1" href="/en/build/agents/add-integrations" width="24" height="24" data-path="icons/file-attachment-02.svg">
    Configure which agents can use which tools.
  </Card>

  <Card title="Use Tools in Prompts" icon="wrench" href="/en/build/agents/single-prompt">
    Learn how to instruct your agents on when to use each tool.
  </Card>
</CardGroup>
