# Dixa

> Create and manage customer service conversations, customers, notes and tags in Dixa.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/dixa

## Actions

### Add internal note

Add a note to a conversation that only your agents see.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Note (`note`, text, required): The note's text.
- Author (`agent_id`, text): The agent the note is from. Leave empty to add it as Dixa's system user.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "authorId": "example",
    "createdAt": "example",
    "csid": 1,
    "id": "example",
    "message": "example"
  }
}
```

### Add message

Add a message to a conversation: one from the customer, or one an agent sends to the customer.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Message (`text`, text, required): The message's text.
- Format (`content_format`, text): How the message is written: plain text (the default), Markdown or HTML. One of: `Text` (Plain text), `Markdown`, `Html`. Default: `Text`.
- Written by (`direction`, text): From the customer (the default), or from an agent, which Dixa sends to the customer. One of: `Inbound` (From the customer), `Outbound` (From an agent). Default: `Inbound`.
- Agent (`agent_id`, text): For a message from an agent: the agent who sends it.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "authorId": "example",
    "content": {
      "_type": "example",
      "value": "example"
    },
    "createdAt": "example",
    "direction": "example",
    "externalId": "example",
    "messageId": "example"
  }
}
```

### Assign conversation to agent

Assign a conversation to an agent, as if they had claimed it.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Agent (`agent_id`, text, required): The agent or admin in Dixa.
- Take over (`take_over`, true/false): Take the conversation even if another agent already has it. Leave off to leave such a conversation alone.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "agent_id": "example",
    "conversation_id": 1,
    "success": true
  }
}
```

### Close conversation

Close a conversation.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Done by (`acting_agent_id`, text): The agent the activity log credits with this. Leave empty to credit Dixa's system user.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "conversation_id": 1,
    "success": true
  }
}
```

### Create customer

Create a customer (end user) in Dixa.

**Inputs**

- Display name (`display_name`, text): The customer's name as Dixa shows it.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Email (`email`, text): The customer's main email address.
- Phone number (`phone_number`, text): The customer's main phone number, with the country code, such as +4531434343.
- External ID (`external_id`, text): The customer's ID in another system of yours, such as your shop or CRM.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "additionalEmails": [
      "example"
    ],
    "additionalPhoneNumbers": [
      "example"
    ],
    "avatarUrl": "example",
    "createdAt": "example",
    "customAttributes": [
      {
        "id": "example",
        "identifier": "example",
        "name": "example"
      }
    ],
    "displayName": "example",
    "email": "example",
    "externalId": "example",
    "firstName": "example",
    "id": "example",
    "lastName": "example",
    "middleNames": [
      "example"
    ],
    "phoneNumber": "example"
  }
}
```

### Create email conversation

Start an email conversation in Dixa for a customer, written by the customer or sent by an agent.

**Inputs**

- Customer (`end_user_id`, text, required): The customer the conversation is with.
- Dixa email address (`email_address`, text, required): The Dixa email address the conversation belongs to.
- Subject (`subject`, text, required): The email's subject.
- Message (`text`, text, required): The first message of the conversation.
- Format (`content_format`, text): How the message is written: plain text (the default), Markdown or HTML. One of: `Text` (Plain text), `Markdown`, `Html`. Default: `Text`.
- Written by (`direction`, text): From the customer (the default), or from an agent, which Dixa sends to the customer. One of: `Inbound` (From the customer), `Outbound` (From an agent). Default: `Inbound`.
- Agent (`agent_id`, text): For a message from an agent: the agent who sends it.
- Language (`language`, text): The conversation's language as a two-letter code, such as en or da.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "id": 1
  }
}
```

### Create tag

Create a tag. If a tag with the same name exists, Dixa returns that one unchanged.

**Inputs**

- Name (`name`, text, required): The tag's name.
- Color (`color`, text): The tag's color as a hex code, such as #4A90E2.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "color": "example",
    "id": "example",
    "name": "example",
    "state": "example"
  }
}
```

### Delete tag

Delete a tag and remove it from every conversation. This can't be undone.

**Inputs**

- Tag (`tag_id`, text, required): The tag.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "success": true,
    "tag_id": "example"
  }
}
```

### Get conversation

Get a conversation with its channel, status, assignee and queue.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "_type": "example",
    "assignment": {
      "agentId": "example",
      "assignedAt": "example"
    },
    "channel": "example",
    "createdAt": "example",
    "customAttributes": [
      {
        "id": "example",
        "identifier": "example",
        "name": "example"
      }
    ],
    "direction": "example",
    "fromEmail": "example",
    "id": 1,
    "integrationEmail": "example",
    "language": "example",
    "queue": {
      "id": "example",
      "queuedAt": "example"
    },
    "requesterId": "example",
    "state": "example",
    "stateUpdatedAt": "example",
    "subject": "example",
    "toEmail": "example"
  }
}
```

### Get customer

Get a customer (end user) with their contact details and custom attributes.

**Inputs**

- Customer (`end_user_id`, text, required): The customer (end user) in Dixa.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "additionalEmails": [
      "example"
    ],
    "additionalPhoneNumbers": [
      "example"
    ],
    "avatarUrl": "example",
    "createdAt": "example",
    "customAttributes": [
      {
        "id": "example",
        "identifier": "example",
        "name": "example"
      }
    ],
    "displayName": "example",
    "email": "example",
    "externalId": "example",
    "firstName": "example",
    "id": "example",
    "lastName": "example",
    "middleNames": [
      "example"
    ],
    "phoneNumber": "example"
  }
}
```

### List agents

List the agents and admins in Dixa, or find one by email or phone number.

**Inputs**

- Email (`email`, text): Only the agent with this email address. Use this or a phone number, not both.
- Phone number (`phone`, text): Only the agent with this phone number. Use this or an email address, not both.
- Page size (`page_limit`, number): How many agents to return in one page. Leave empty for Dixa's default. At least 1.
- Page key (`page_key`, text): To read the next page, the next_page_key value a previous list step returned.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "additionalEmails": [
          "example"
        ],
        "additionalPhoneNumbers": [
          "example"
        ],
        "avatarUrl": "example",
        "createdAt": "example",
        "displayName": "example",
        "email": "example",
        "firstName": "example",
        "id": "example",
        "lastName": "example",
        "middleNames": [
          "example"
        ],
        "phoneNumber": "example",
        "roles": [
          "example"
        ]
      }
    ],
    "next_page_key": "example"
  }
}
```

### List customer conversations

List the conversations a customer (end user) started.

**Inputs**

- Customer (`end_user_id`, text, required): The customer (end user) in Dixa.
- Page size (`page_limit`, number): How many conversations to return in one page. Leave empty for Dixa's default. At least 1.
- Page key (`page_key`, text): To read the next page, the next_page_key value a previous list step returned.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "_type": "example",
        "assignment": {
          "agentId": "example",
          "assignedAt": "example"
        },
        "channel": "example",
        "createdAt": "example",
        "customAttributes": [
          {
            "id": "example",
            "identifier": "example",
            "name": "example"
          }
        ],
        "direction": "example",
        "fromEmail": "example",
        "id": 1,
        "integrationEmail": "example",
        "language": "example",
        "queue": {
          "id": "example",
          "queuedAt": "example"
        },
        "requesterId": "example",
        "state": "example",
        "stateUpdatedAt": "example",
        "subject": "example",
        "toEmail": "example"
      }
    ],
    "next_page_key": "example"
  }
}
```

### List customers

List customers (end users), or find them by email, phone number or external ID.

**Inputs**

- Email (`email`, text): Only the customer with this email address. Use this or a phone number, not both.
- Phone number (`phone`, text): Only the customer with this phone number. Use this or an email address, not both.
- External ID (`external_id`, text): Only the customer with this ID from another system of yours.
- Page size (`page_limit`, number): How many customers to return in one page. Leave empty for Dixa's default. At least 1.
- Page key (`page_key`, text): To read the next page, the next_page_key value a previous list step returned.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "additionalEmails": [
          "example"
        ],
        "additionalPhoneNumbers": [
          "example"
        ],
        "avatarUrl": "example",
        "createdAt": "example",
        "customAttributes": [
          {
            "id": "example",
            "identifier": "example",
            "name": "example"
          }
        ],
        "displayName": "example",
        "email": "example",
        "externalId": "example",
        "firstName": "example",
        "id": "example",
        "lastName": "example",
        "middleNames": [
          "example"
        ],
        "phoneNumber": "example"
      }
    ],
    "next_page_key": "example"
  }
}
```

### List email addresses and phone numbers

List the email addresses and phone numbers customers reach you on in Dixa.

**Inputs**

- Type (`endpoint_type`, text): Only email addresses, or only phone numbers. Leave empty for both. One of: `EmailEndpoint` (Email addresses), `TelephonyEndpoint` (Phone numbers).

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "_type": "example",
        "address": "example",
        "functionality": [
          "example"
        ],
        "name": "example",
        "number": "example",
        "senderOverride": "example"
      }
    ]
  }
}
```

### List internal notes

List the internal notes on a conversation.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "authorId": "example",
        "createdAt": "example",
        "csid": 1,
        "id": "example",
        "message": "example"
      }
    ]
  }
}
```

### List messages

List a conversation's messages, oldest first.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "attributes": {
          "_type": "example",
          "attachments": [
            {
              "prettyName": "example",
              "url": "example"
            }
          ],
          "cc": [
            {
              "email": "example",
              "name": "example"
            }
          ],
          "content": {
            "_type": "example",
            "value": "example"
          },
          "direction": "example",
          "emailContent": {
            "_type": "example",
            "content": {
              "_type": "example",
              "value": "example"
            },
            "file": {
              "prettyName": "example",
              "url": "example"
            }
          },
          "isAutoReply": true,
          "isAutomated": true,
          "to": [
            {
              "email": "example",
              "name": "example"
            }
          ]
        },
        "authorId": "example",
        "createdAt": "example",
        "externalId": "example",
        "id": "example"
      }
    ]
  }
}
```

### List queues

List the queues conversations wait in for an agent.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "id": "example",
        "isDefault": true,
        "isDoNotOfferEnabled": true,
        "isPreferredAgentEnabled": true,
        "isRestricted": true,
        "memberListType": "example",
        "name": "example",
        "offerAbandonedConversations": true,
        "offerTimeout": 1,
        "offeringAlgorithm": "example",
        "organizationId": "example",
        "priority": 1,
        "wrapupTimeout": 1
      }
    ]
  }
}
```

### List tags

List the tags in Dixa. Only active tags unless you include deactivated ones.

**Inputs**

- Include deactivated (`include_deactivated`, true/false): Also list tags that have been deactivated.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "color": "example",
        "id": "example",
        "name": "example",
        "state": "example"
      }
    ]
  }
}
```

### Remove tag from conversation

Remove a tag from a conversation.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Tag (`tag_id`, text, required): The tag.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "conversation_id": 1,
    "success": true,
    "tag_id": "example"
  }
}
```

### Reopen conversation

Reopen a closed conversation and offer it in its queue again, or in the default queue.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Done by (`acting_agent_id`, text): The agent the activity log credits with this. Leave empty to credit Dixa's system user.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "conversation_id": 1,
    "success": true
  }
}
```

### Search conversations

Find conversations by the text in them and by status, channel, queue, agent, tag or creation time. Returns their IDs.

**Inputs**

- Search text (`text`, text): Words to look for in the conversations' subjects and messages.
- Exact match (`exact_match`, true/false): Match the search text exactly rather than any of its words.
- Statuses (`statuses`, list): Only conversations in one of these statuses. One or more of: `open`, `closed`, `pending`.
- Channels (`channels`, list): Only conversations on one of these channels. One or more of: `email`, `contactform` (Contact form), `chat`, `dixamessenger` (Dixa Messenger), `phone`, `voicemail`, `callback`, `sms`, `facebookmessenger` (Facebook Messenger), `whatsapp`, and 6 more.
- Queue (`queue_id`, text): Only conversations in this queue.
- Agent (`agent_id`, text): Only conversations assigned to this agent.
- Tags (`tag_ids`, list): Only conversations with at least one of these tags.
- Created after (`created_after`, date and time): Only conversations created at or after this time.
- Created before (`created_before`, date and time): Only conversations created at or before this time.
- Page size (`page_limit`, number): How many conversations to return in one page. Leave empty for Dixa's default. At least 1.
- Page key (`page_key`, text): To read the next page, the next_page_key value a previous list step returned.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [
      {
        "highlights": {},
        "id": 1
      }
    ],
    "next_page_key": "example"
  }
}
```

### Set follow-up

Put a conversation on follow-up until a date and time, when Dixa brings it back.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Follow up at (`follow_up_at`, date and time, required): When the follow-up ends and the conversation comes back.
- Done by (`acting_agent_id`, text): The agent the activity log credits with this. Leave empty to credit Dixa's system user.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "conversation_id": 1,
    "success": true
  }
}
```

### Tag conversation

Add an active tag to a conversation.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Tag (`tag_id`, text, required): The tag.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "conversation_id": 1,
    "success": true,
    "tag_id": "example"
  }
}
```

### Transfer conversation to queue

Move a conversation to another queue.

**Inputs**

- Conversation ID (`conversation_id`, number, required): The conversation's number, shown as its ID in Dixa. At least 1.
- Queue (`queue_id`, text, required): The queue to move the conversation to.
- Done by (`acting_agent_id`, text): The agent the activity log credits with this. Leave empty to credit Dixa's system user.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "conversation_id": 1,
    "queue_id": "example",
    "success": true
  }
}
```

### Update customer

Change a customer's name or contact details. Fields left empty stay as they are.

**Inputs**

- Customer (`end_user_id`, text, required): The customer (end user) in Dixa.
- Display name (`display_name`, text): The new name as Dixa shows it.
- First name (`first_name`, text): The new first name.
- Last name (`last_name`, text): The new last name.
- Email (`email`, text): The new main email address.
- Phone number (`phone_number`, text): The new main phone number, with the country code, such as +4531434343.
- External ID (`external_id`, text): The new ID in another system of yours, such as your shop or CRM.

**Outputs**

- `data` (object): The response from Dixa.

**Example output**

```json
{
  "data": {
    "additionalEmails": [
      "example"
    ],
    "additionalPhoneNumbers": [
      "example"
    ],
    "avatarUrl": "example",
    "createdAt": "example",
    "customAttributes": [
      {
        "id": "example",
        "identifier": "example",
        "name": "example"
      }
    ],
    "displayName": "example",
    "email": "example",
    "externalId": "example",
    "firstName": "example",
    "id": "example",
    "lastName": "example",
    "middleNames": [
      "example"
    ],
    "phoneNumber": "example"
  }
}
```
