# Invoca

> Work with Invoca call tracking: read calls, their transcripts and signals, report sales back onto calls, and manage advertisers, their campaigns and affiliates.

App · 21 actions. Web page: https://docs.lodol.com/docs/integrations/invoca

## Actions

### Archive campaign

Archive a campaign, which stops it taking calls. Unarchive it to use it again.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.
- Campaign (`campaign_id`, text, required): The advertiser's campaign. Pick one, or give its ID from network.

**Outputs**

- `advertiser_id` (text): The advertiser
- `campaign_id` (text): The campaign
- `done` (true/false): True once archived

**Example output**

```json
{
  "advertiser_id": "acme",
  "campaign_id": "100",
  "done": true
}
```

### Create advertiser

Add an advertiser to the network. Add its users and campaigns in Invoca.

**Inputs**

- Name (`name`, text, required): The advertiser's name, unique in the network.
- ID from network (`advertiser_id`, text): Your own ID for it, unique in the network. Leave empty if your network makes IDs for you.
- Status (`status`, text): Its approval status. New ones are Approved unless another is chosen. One of: `Approved`, `Applied`, `Declined`, `Suspended`, `Archived`.
- Custom data (`custom_data`, object): Values for your custom data fields, by each field's partner (API) name, applied to calls through it.

**Outputs**

- `advertiser` (object): The new advertiser

**Example output**

```json
{
  "advertiser": {
    "approval_status": "Approved",
    "custom_data": {
      "channel": "Online lead"
    },
    "id": 43838,
    "id_from_network": "acme",
    "name": "Acme Insurance",
    "object_url": "https://acme.invoca.net/as/43838/dashboards/ui",
    "sites": [
      {
        "id_from_network": "315",
        "name": "acme.example.com"
      }
    ],
    "users": [
      {
        "email_settings": [
          {
            "email_address": "chris@example.com",
            "use_for_notifications": true
          }
        ],
        "first_name": "Chris",
        "id_from_network": "549494858585",
        "last_name": "Dean",
        "role": "Manager"
      }
    ]
  }
}
```

### Create affiliate

Add an affiliate (publisher) to the network.

**Inputs**

- Name (`name`, text, required): The affiliate's name, unique in the network.
- ID from network (`affiliate_id`, text): Your own ID for it, unique in the network. Leave empty if your network makes IDs for you.
- Status (`status`, text): Its approval status. New ones are Approved unless another is chosen. One of: `Approved`, `Applied`, `Declined`, `Suspended`, `Archived`.
- Custom data (`custom_data`, object): Values for your custom data fields, by each field's partner (API) name, applied to calls through it.

**Outputs**

- `affiliate` (object): The new affiliate

**Example output**

```json
{
  "affiliate": {
    "custom_data": {},
    "id": 4401,
    "id_from_network": "222",
    "name": "Surf Oz Magazine",
    "object_url": "https://acme.invoca.net/affiliates/4401",
    "sites": [],
    "status": "Approved",
    "users": []
  }
}
```

### Delete advertiser

Delete an advertiser from the network.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.

**Outputs**

- `advertiser_id` (text): The advertiser deleted
- `deleted` (true/false): True once it is gone

**Example output**

```json
{
  "advertiser_id": "acme",
  "deleted": true
}
```

### Delete affiliate

Delete an affiliate from the network.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate (publisher). Pick one, or give its ID from network.

**Outputs**

- `affiliate_id` (text): The affiliate deleted
- `deleted` (true/false): True once it is gone

**Example output**

```json
{
  "affiliate_id": "222",
  "deleted": true
}
```

### Get advertiser

Get one advertiser with its users, sites and custom data.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.

**Outputs**

- `advertiser` (object): The advertiser

**Example output**

```json
{
  "advertiser": {
    "approval_status": "Approved",
    "custom_data": {
      "channel": "Online lead"
    },
    "id": 43838,
    "id_from_network": "acme",
    "name": "Acme Insurance",
    "object_url": "https://acme.invoca.net/as/43838/dashboards/ui",
    "sites": [
      {
        "id_from_network": "315",
        "name": "acme.example.com"
      }
    ],
    "users": [
      {
        "email_settings": [
          {
            "email_address": "chris@example.com",
            "use_for_notifications": true
          }
        ],
        "first_name": "Chris",
        "id_from_network": "549494858585",
        "last_name": "Dean",
        "role": "Manager"
      }
    ]
  }
}
```

### Get affiliate

Get one affiliate (publisher) with its users, sites and custom data.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate (publisher). Pick one, or give its ID from network.

**Outputs**

- `affiliate` (object): The affiliate

**Example output**

```json
{
  "affiliate": {
    "custom_data": {},
    "id": 4401,
    "id_from_network": "222",
    "name": "Surf Oz Magazine",
    "object_url": "https://acme.invoca.net/affiliates/4401",
    "sites": [],
    "status": "Approved",
    "users": []
  }
}
```

### Get call transcript

Get a call's transcript, turn by turn or by speaker. Needs Invoca's conversation intelligence on the account.

**Inputs**

- Call record ID (`call_record_id`, text, required): The call's record ID (complete_call_id), from a transaction.
- Format (`transcript_format`, text): How to lay out the transcript. Defaults to turn by turn. One of: `caller_agent_conversation` (Conversation, turn by turn), `caller_agent_block` (Caller and agent, one block each), `caller` (Caller only), `agent` (Agent only).

**Outputs**

- `count` (number): How many were returned
- `lines` (list): Who said what, in order
- `text` (text): The transcript as plain text

**Example output**

```json
{
  "count": 2,
  "lines": [
    {
      "speaker": "agent",
      "text": "Which color?"
    },
    {
      "speaker": "caller",
      "text": "Orange"
    }
  ],
  "text": "Agent: Which color?\nCaller: Orange"
}
```

### Get campaign

Get one of an advertiser's campaigns with its current and upcoming terms.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.
- Campaign (`campaign_id`, text, required): The advertiser's campaign. Pick one, or give its ID from network.

**Outputs**

- `campaign` (object): The campaign

**Example output**

```json
{
  "campaign": {
    "current_terms": {
      "timezone": "Pacific Time (US & Canada)"
    },
    "future_terms": {},
    "id": 11,
    "id_from_network": "100",
    "name": "Spring promotion",
    "object_url": "https://acme.invoca.net/a_campaigns/terms/11",
    "status": "Live"
  }
}
```

### Get campaign call stats

Get a campaign's call count and average call length for today, the last 7 days and the last 30 days.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.
- Campaign (`campaign_id`, text, required): The advertiser's campaign. Pick one, or give its ID from network.

**Outputs**

- `last_30_days` (object): The last 30 days
- `last_7_days` (object): The last 7 days
- `today` (object): Today

**Example output**

```json
{
  "last_30_days": {
    "call_avg_total_duration": 165.0,
    "call_count": 120
  },
  "last_7_days": {
    "call_avg_total_duration": 170.2,
    "call_count": 31
  },
  "today": {
    "call_avg_total_duration": 182.5,
    "call_count": 4
  }
}
```

### Get network

Get the connected Invoca network's name and its users.

**Inputs**: None.

**Outputs**

- `name` (text): The network's name
- `network` (object): Everything Invoca returned
- `users` (list): The network's users

**Example output**

```json
{
  "name": "Acme",
  "network": {
    "name": "Acme",
    "users": [
      {
        "email_settings": [
          {
            "email_address": "chris@example.com",
            "use_for_notifications": true
          }
        ],
        "first_name": "Chris",
        "id_from_network": "549494858585",
        "last_name": "Dean",
        "role": "Manager"
      }
    ]
  },
  "users": [
    {
      "email_settings": [
        {
          "email_address": "chris@example.com",
          "use_for_notifications": true
        }
      ],
      "first_name": "Chris",
      "id_from_network": "549494858585",
      "last_name": "Dean",
      "role": "Manager"
    }
  ]
}
```

### Get transaction

Get one transaction (a call leg, signal or conversion) by its ID.

**Inputs**

- Transaction ID (`transaction_id`, text, required): The transaction's ID.

**Outputs**

- `transaction` (object): The transaction

**Example output**

```json
{
  "transaction": {
    "advertiser_campaign_id_from_network": "100",
    "advertiser_campaign_name": "Spring promotion",
    "advertiser_id_from_network": "acme",
    "advertiser_name": "Acme Insurance",
    "affiliate_id_from_network": "222",
    "affiliate_name": "Surf Oz Magazine",
    "call_result_description_detail": "Connected",
    "call_source_description": "Online",
    "calling_phone_number": "805-555-1234",
    "city": "Santa Barbara",
    "complete_call_id": "CUID-33",
    "connect_duration": 170,
    "duration": 184,
    "recording": "https://acme.invoca.net/call/recording/CUID-33",
    "region": "CA",
    "signals": [],
    "start_time_local": "2026-11-30 07:04:05 -0800",
    "start_time_utc": "2026-11-30T15:04:05Z",
    "transaction_id": "C624DA2C-CF3367C3",
    "transaction_type": "Call"
  }
}
```

### List a call's transactions

List every transaction of one call: its legs, signals and conversions.

**Inputs**

- Call record ID (`call_record_id`, text, required): The call's record ID (complete_call_id), from a transaction.

**Outputs**

- `count` (number): How many were returned
- `transactions` (list): The call's transactions

**Example output**

```json
{
  "count": 1,
  "transactions": [
    {
      "advertiser_campaign_id_from_network": "100",
      "advertiser_campaign_name": "Spring promotion",
      "advertiser_id_from_network": "acme",
      "advertiser_name": "Acme Insurance",
      "affiliate_id_from_network": "222",
      "affiliate_name": "Surf Oz Magazine",
      "call_result_description_detail": "Connected",
      "call_source_description": "Online",
      "calling_phone_number": "805-555-1234",
      "city": "Santa Barbara",
      "complete_call_id": "CUID-33",
      "connect_duration": 170,
      "duration": 184,
      "recording": "https://acme.invoca.net/call/recording/CUID-33",
      "region": "CA",
      "signals": [],
      "start_time_local": "2026-11-30 07:04:05 -0800",
      "start_time_utc": "2026-11-30T15:04:05Z",
      "transaction_id": "C624DA2C-CF3367C3",
      "transaction_type": "Call"
    }
  ]
}
```

### List advertisers

List the network's advertisers with their users and sites.

**Inputs**: None.

**Outputs**

- `advertisers` (list): The advertisers
- `count` (number): How many were returned

**Example output**

```json
{
  "advertisers": [
    {
      "approval_status": "Approved",
      "custom_data": {
        "channel": "Online lead"
      },
      "id": 43838,
      "id_from_network": "acme",
      "name": "Acme Insurance",
      "object_url": "https://acme.invoca.net/as/43838/dashboards/ui",
      "sites": [
        {
          "id_from_network": "315",
          "name": "acme.example.com"
        }
      ],
      "users": [
        {
          "email_settings": [
            {
              "email_address": "chris@example.com",
              "use_for_notifications": true
            }
          ],
          "first_name": "Chris",
          "id_from_network": "549494858585",
          "last_name": "Dean",
          "role": "Manager"
        }
      ]
    }
  ],
  "count": 1
}
```

### List affiliates

List the network's affiliates (publishers) with their users and sites.

**Inputs**: None.

**Outputs**

- `affiliates` (list): The affiliates
- `count` (number): How many were returned

**Example output**

```json
{
  "affiliates": [
    {
      "custom_data": {},
      "id": 4401,
      "id_from_network": "222",
      "name": "Surf Oz Magazine",
      "object_url": "https://acme.invoca.net/affiliates/4401",
      "sites": [],
      "status": "Approved",
      "users": []
    }
  ],
  "count": 1
}
```

### List campaigns

List an advertiser's campaigns with their status and terms.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.

**Outputs**

- `campaigns` (list): The campaigns
- `count` (number): How many were returned

**Example output**

```json
{
  "campaigns": [
    {
      "current_terms": {
        "timezone": "Pacific Time (US & Canada)"
      },
      "future_terms": {},
      "id": 11,
      "id_from_network": "100",
      "name": "Spring promotion",
      "object_url": "https://acme.invoca.net/a_campaigns/terms/11",
      "status": "Live"
    }
  ],
  "count": 1
}
```

### List transactions

List the network's calls, signals and conversions, oldest first, with caller, campaign, affiliate, duration and outcome. Gets one page; to see more, run it again with the last transaction ID it gives.

**Inputs**

- From (`from_date`, date): Calls that started on or after this day. Give both days or neither.
- To (`to_date`, date): Calls that started on or before this day.
- Type (`transaction_type`, text): Only this kind of transaction. Leave empty for all. One of: `Call` (Calls), `Signal` (Signals), `Sale` (Reported conversions), `PostCallEvent` (Post-call events).
- Page size (`limit`, number): How many to return, 1 to 4,000. Defaults to 100. From 1 to 4000.
- After transaction (`start_after_transaction_id`, text): Start after this transaction, such as the last transaction ID of an earlier page (keep the same days).

**Outputs**

- `count` (number): How many were returned
- `last_transaction_id` (text): The last transaction's ID, to get the next page
- `transactions` (list): The transactions

**Example output**

```json
{
  "count": 1,
  "last_transaction_id": "C624DA2C-CF3367C3",
  "transactions": [
    {
      "advertiser_campaign_id_from_network": "100",
      "advertiser_campaign_name": "Spring promotion",
      "advertiser_id_from_network": "acme",
      "advertiser_name": "Acme Insurance",
      "affiliate_id_from_network": "222",
      "affiliate_name": "Surf Oz Magazine",
      "call_result_description_detail": "Connected",
      "call_source_description": "Online",
      "calling_phone_number": "805-555-1234",
      "city": "Santa Barbara",
      "complete_call_id": "CUID-33",
      "connect_duration": 170,
      "duration": 184,
      "recording": "https://acme.invoca.net/call/recording/CUID-33",
      "region": "CA",
      "signals": [],
      "start_time_local": "2026-11-30 07:04:05 -0800",
      "start_time_utc": "2026-11-30T15:04:05Z",
      "transaction_id": "C624DA2C-CF3367C3",
      "transaction_type": "Call"
    }
  ]
}
```

### Report signal on a call

Record that something happened on a call after it ended, such as a sale with its revenue, and set custom data on it. Reporting the same signal name and unique ID again corrects it.

**Inputs**

- Signal (`signal_name`, text, required): What happened, such as Sale or Quote.
- Transaction ID (`transaction_id`, text): The call's transaction ID. Give this or the call record ID.
- Call record ID (`call_record_id`, text): The call's record ID. Give this or the transaction ID.
- Revenue (`revenue`, number): The amount, in the account's currency. Leave empty if there was no sale. At least 0.
- Happened (`met`, true/false): Turn off to record that the signal did not happen. Defaults to on.
- Unique ID (`partner_unique_id`, text): Your own ID for this signal on the call, to correct it later rather than add another.
- When (`occurred_at`, date and time): When it happened. Defaults to now.
- Custom data (`custom_data`, object): Values for your custom data fields, by each field's partner (API) name.

**Outputs**

- `call` (object): Call
- `signals` (list): The signals recorded

**Example output**

```json
{
  "call": {
    "call_start_time": "2026-11-30T15:04:05Z",
    "transaction_id": "00000000-00000001"
  },
  "signals": [
    {
      "name": "Sale",
      "occurred_at_time": "2026-11-30T16:41:53Z",
      "partner_unique_id": "1",
      "revenue": "100.0",
      "transaction_id": "00000000-0000000A",
      "value": "true"
    }
  ]
}
```

### Unarchive campaign

Bring an archived campaign back, paused. Set it live again in Invoca.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.
- Campaign (`campaign_id`, text, required): The advertiser's campaign. Pick one, or give its ID from network.

**Outputs**

- `advertiser_id` (text): The advertiser
- `campaign_id` (text): The campaign
- `done` (true/false): True once unarchived

**Example output**

```json
{
  "advertiser_id": "acme",
  "campaign_id": "100",
  "done": true
}
```

### Update advertiser

Rename an advertiser, change its status or set its custom data. Only the fields given change.

**Inputs**

- Advertiser (`advertiser_id`, text, required): The advertiser. Pick one, or give its ID from network.
- Name (`name`, text): A new name. Leave empty to keep it.
- Status (`status`, text): Its approval status. New ones are Approved unless another is chosen. One of: `Approved`, `Applied`, `Declined`, `Suspended`, `Archived`.
- Custom data (`custom_data`, object): Values for your custom data fields, by each field's partner (API) name, applied to calls through it.

**Outputs**

- `advertiser` (object): The advertiser

**Example output**

```json
{
  "advertiser": {
    "approval_status": "Suspended",
    "custom_data": {
      "channel": "Online lead"
    },
    "id": 43838,
    "id_from_network": "acme",
    "name": "Acme Insurance",
    "object_url": "https://acme.invoca.net/as/43838/dashboards/ui",
    "sites": [
      {
        "id_from_network": "315",
        "name": "acme.example.com"
      }
    ],
    "users": [
      {
        "email_settings": [
          {
            "email_address": "chris@example.com",
            "use_for_notifications": true
          }
        ],
        "first_name": "Chris",
        "id_from_network": "549494858585",
        "last_name": "Dean",
        "role": "Manager"
      }
    ]
  }
}
```

### Update affiliate

Rename an affiliate, change its status or set its custom data. Only the fields given change.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate (publisher). Pick one, or give its ID from network.
- Name (`name`, text): A new name. Leave empty to keep it.
- Status (`status`, text): Its approval status. New ones are Approved unless another is chosen. One of: `Approved`, `Applied`, `Declined`, `Suspended`, `Archived`.
- Custom data (`custom_data`, object): Values for your custom data fields, by each field's partner (API) name, applied to calls through it.

**Outputs**

- `affiliate` (object): The affiliate

**Example output**

```json
{
  "affiliate": {
    "custom_data": {},
    "id": 4401,
    "id_from_network": "222",
    "name": "Surf Oz Media",
    "object_url": "https://acme.invoca.net/affiliates/4401",
    "sites": [],
    "status": "Approved",
    "users": []
  }
}
```
