# Acoustic Campaign

> Add, update and opt out Acoustic Campaign contacts, manage contact lists, start programs, send autoresponders, read mailing results, and follow new sends, lists and programs.

App · 22 actions. Web page: https://docs.lodol.com/docs/integrations/acoustic

## Actions

### Add contact

Add a contact to a database, or update them if they are already in it, with field values and contact lists.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Email (`email`, text, required): The contact's email address.
- Fields (`columns`, object): Values for the database's fields, each a field name with its value, such as `First Name`: `Ann`. Get database shows the field names.
- Contact lists (`contact_list_ids`, list): Contact lists to add the contact to as well.
- Update if found (`update_if_found`, true/false): Off to leave an existing contact as they are. Leave empty to update them.
- Send autoresponder (`send_autoreply`, true/false): On to send the database's confirmation autoresponder, if it has one.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "ORGANIZATION_ID": "example",
    "RECIPIENTID": "example",
    "SUCCESS": "example"
  }
}
```

### Add contact to contact list

Add a contact already in the list's database to a contact list, by email address.

**Inputs**

- Contact list (`contact_list_id`, number, required): The contact list. At least 1.
- Email (`email`, text, required): The contact's email address.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "SUCCESS": "example"
  }
}
```

### Add contact to program

Start a contact at the beginning of a program. Get contact gives the contact's ID.

**Inputs**

- Program (`program_id`, number, required): The program. At least 1.
- Contact ID (`contact_id`, text, required): The contact's ID (RecipientId), which Get contact and Add contact return.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "SUCCESS": "example"
  }
}
```

### Add or update relational table rows

Add rows to a relational table, such as purchases, or update the rows with the same key.

**Inputs**

- Relational table (`table_id`, number, required): The relational table. At least 1.
- Rows (`rows`, list, required): The rows, each a set of column names with their values, such as `Order Id`: `1234`.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "FAILURES": [
      {}
    ],
    "SUCCESS": "example"
  }
}
```

### Confirm double opt-in

Confirm a contact who signed up to a double opt-in database, with any field values to save.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Email (`email`, text, required): The contact's email address.
- Fields (`columns`, object): Values for the database's fields, each a field name with its value, such as `First Name`: `Ann`. Get database shows the field names.
- Send autoresponder (`send_autoreply`, true/false): On to send the database's confirmation autoresponder, if it has one.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "ORGANIZATION_ID": "example",
    "RECIPIENTID": "example",
    "SUCCESS": "example"
  }
}
```

### Create contact list

Create a contact list in a database.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Name (`name`, text, required): The contact list's name.
- Visibility (`visibility`, text): Shared with your organization, or private to you. Leave empty for shared. One of: `0` (Private), `1` (Shared).

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "CONTACT_LIST_ID": "example",
    "SUCCESS": "example"
  }
}
```

### Delete contact list

Delete a contact list that no program, form or other asset uses. Its contacts stay in the database.

**Inputs**

- Contact list (`contact_list_id`, number, required): The contact list. At least 1.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

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

### Get contact

Get a contact's ID, opt-in and opt-out dates, field values and contact lists, by email address.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Email (`email`, text, required): The contact's email address.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "COLUMNS": [
      {
        "NAME": "example",
        "VALUE": "example"
      }
    ],
    "CONTACT_LISTS": [
      "example"
    ],
    "CreatedFrom": "example",
    "EMAIL": "example",
    "EmailType": "example",
    "LastModified": "example",
    "OptedIn": "example",
    "OptedOut": "example",
    "RecipientId": "example",
    "SUCCESS": "example"
  }
}
```

### Get data job status

Get whether a background data job, such as an import or export, is waiting, running, complete or failed.

**Inputs**

- Job ID (`job_id`, number, required): The job's ID, which the call that started it returned. At least 1.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "JOB_DESCRIPTION": "example",
    "JOB_ID": "example",
    "JOB_STATUS": "example",
    "PARAMETERS": {},
    "SUCCESS": "example"
  }
}
```

### Get database

Get a database's size, opt-outs, key fields and every field's name and type.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "COLUMNS": [
      {
        "DEFAULT_VALUE": "example",
        "NAME": "example",
        "TYPE": "example"
      }
    ],
    "CREATED": "example",
    "ID": "example",
    "KEY_COLUMNS": [
      "example"
    ],
    "LAST_MODIFIED": "example",
    "NAME": "example",
    "NUM_OPT_OUTS": "example",
    "NUM_UNDELIVERABLE": "example",
    "SIZE": "example",
    "SUCCESS": "example",
    "TYPE": "example",
    "VISIBILITY": "example"
  }
}
```

### Get mailing metrics

Get a sent mailing's totals: sends, bounces, opens, clicks, opt-outs, conversions and more.

**Inputs**

- Mailing ID (`mailing_id`, number, required): The sent mailing's ID (MailingId), which List sent mailings returns. At least 1.
- Report ID (`report_id`, number, required): The send's report ID (ReportId), which List sent mailings returns. At least 1.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "Mailing": [
      {
        "MailingId": "example",
        "MailingName": "example",
        "NumBounceHard": "example",
        "NumBounceSoft": "example",
        "NumConversions": "example",
        "NumGrossAbuse": "example",
        "NumGrossClick": "example",
        "NumGrossOpen": "example",
        "NumSent": "example",
        "NumUniqueClick": "example",
        "NumUniqueOpen": "example",
        "NumUnsubscribes": "example",
        "ReportId": "example",
        "SentDateTime": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List contact's mailings

List the mailings a contact was sent from a database, with their opens, clicks, bounces and opt-outs.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Contact ID (`contact_id`, text, required): The contact's ID (RecipientId), which Get contact returns.
- From (`start`, date and time): Only mailings sent at or after this time.
- To (`end`, date and time): Only mailings sent before this time.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "Mailing": [
      {
        "MailingId": "example",
        "MailingName": "example",
        "SentDateTime": "example",
        "TotalBounces": "example",
        "TotalClicks": "example",
        "TotalConversions": "example",
        "TotalOpens": "example",
        "TotalOptOuts": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List contact's programs

List the programs a contact is or was in, for one database.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Contact ID (`contact_id`, text, required): The contact's ID (RecipientId), which Get contact returns.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "PROGRAMS": [
      {
        "CREATED": "example",
        "END_DATE": "example",
        "ID": "example",
        "LAST_MODIFIED": "example",
        "LIST_ID": "example",
        "NAME": "example",
        "NOTES": "example",
        "START_DATE": "example",
        "STATE": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List databases

List the databases, contact lists, queries or relational tables you can see.

**Inputs**

- Type (`list_type`, text): What to list. Leave empty for databases. One of: `databases`, `contact_lists` (Contact lists), `queries`, `relational_tables` (Relational tables), `suppression_lists` (Suppression lists), `all` (Databases, contact lists and queries).
- Visibility (`visibility`, text): Shared ones, or only your private ones. Leave empty for shared. One of: `0` (Private), `1` (Shared).

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "LIST": [
      {
        "ID": "example",
        "IS_FOLDER": "example",
        "LAST_MODIFIED": "example",
        "NAME": "example",
        "NUM_OPT_OUTS": "example",
        "NUM_UNDELIVERABLE": "example",
        "PARENT_FOLDER_ID": "example",
        "PARENT_NAME": "example",
        "SIZE": "example",
        "TYPE": "example",
        "VISIBILITY": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List mailing templates

List the saved mailing templates, optionally only those changed in a date range.

**Inputs**

- Visibility (`visibility`, text): Shared templates, or only your private ones. Leave empty for shared. One of: `0` (Private), `1` (Shared).
- Changed from (`changed_from`, date and time): Only templates changed at or after this time.
- Changed to (`changed_to`, date and time): Only templates changed before this time.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "MAILING_TEMPLATE": [
      {
        "LAST_MODIFIED": "example",
        "MAILING_ID": "example",
        "MAILING_NAME": "example",
        "SUBJECT": "example",
        "USER_ID": "example",
        "VISIBILITY": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List programs

List the automated programs, optionally only active or inactive ones, for one database or created in a date range.

**Inputs**

- Include active (`include_active`, true/false): Off to leave out running, scheduled and completed programs.
- Include inactive (`include_inactive`, true/false): Off to leave out inactive programs.
- Database (`database_id`, number): Only programs that use this database. At least 1.
- Created from (`created_from`, date): Only programs created on or after this day.
- Created to (`created_to`, date): Only programs created on or before this day.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "PROGRAMS": [
      {
        "CREATED": "example",
        "END_DATE": "example",
        "ID": "example",
        "LAST_MODIFIED": "example",
        "LIST_ID": "example",
        "NAME": "example",
        "NOTES": "example",
        "START_DATE": "example",
        "STATE": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List sent mailings

List the mailings your organization sent in a date range, with their report IDs and send counts.

**Inputs**

- From (`start`, date and time, required): The start of the date range.
- To (`end`, date and time, required): The end of the date range.
- Sent only (`sent_only`, true/false): Off to include scheduled and sending mailings too.
- Leave out test mailings (`exclude_tests`, true/false): Off to include test mailings.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "Mailing": [
      {
        "ListId": "example",
        "ListName": "example",
        "MailingId": "example",
        "MailingName": "example",
        "NumSent": "example",
        "ParentTemplateId": "example",
        "ReportId": "example",
        "ScheduledTS": "example",
        "SentTS": "example",
        "Subject": "example",
        "UserName": "example",
        "Visibility": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### List sent mailings for database

List the mailings sent to one database in a date range. Needs an organization admin's access.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- From (`start`, date and time, required): The start of the date range.
- To (`end`, date and time, required): The end of the date range.
- Sent only (`sent_only`, true/false): Off to include scheduled and sending mailings too.
- Leave out test mailings (`exclude_tests`, true/false): Off to include test mailings.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "Mailing": [
      {
        "ListId": "example",
        "ListName": "example",
        "MailingId": "example",
        "MailingName": "example",
        "NumSent": "example",
        "ParentTemplateId": "example",
        "ReportId": "example",
        "ScheduledTS": "example",
        "SentTS": "example",
        "Subject": "example",
        "UserName": "example",
        "Visibility": "example"
      }
    ],
    "SUCCESS": "example"
  }
}
```

### Opt out contact

Opt a contact out of a database, so they get no more of its mailings.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Email (`email`, text, required): The contact's email address.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "ORGANIZATION_ID": "example",
    "SUCCESS": "example"
  }
}
```

### Remove contact

Remove a contact from a database with their data, or only from a contact list. Removing from a database can't be undone.

**Inputs**

- Database or contact list (`list_id`, number, required): The database to delete the contact from, or a contact list to take them off. At least 1.
- Email (`email`, text, required): The contact's email address.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "ORGANIZATION_ID": "example",
    "SUCCESS": "example"
  }
}
```

### Send autoresponder to contact

Send a custom-event autoresponder to one contact. It sends only autoresponders, never a whole mailing.

**Inputs**

- Autoresponder mailing ID (`mailing_id`, number, required): The custom-event autoresponder's mailing ID, shown when you hover over its name in Acoustic. At least 1.
- Email (`email`, text, required): The contact's email address.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "ORGANIZATION_ID": "example",
    "SUCCESS": "example"
  }
}
```

### Update contact

Change a contact's email address or field values, or resubscribe them. Fields left empty stay as they are.

**Inputs**

- Database (`database_id`, number, required): The database (the contacts and their fields). At least 1.
- Email (`email`, text, required): The contact's email address.
- New email (`new_email`, text): The contact's new email address.
- Fields (`columns`, object): Values for the database's fields, each a field name with its value, such as `First Name`: `Ann`. Get database shows the field names.
- Resubscribe (`resubscribe`, true/false): On to opt a contact who opted out back in. Only do this with their consent.

**Outputs**

- `data` (object): The response from Acoustic Campaign.

**Example output**

```json
{
  "data": {
    "ORGANIZATION_ID": "example",
    "RECIPIENTID": "example",
    "SUCCESS": "example"
  }
}
```
