# Listrak

> Manage Listrak email lists, contacts, campaigns and events, send transactional messages, read message results, and follow new subscribers, unsubscribes and sends.

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

## Actions

### Add or update contact

Add a contact to a list, or update the contact if they are already on it, with their profile field values.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Email (`email`, text, required): The contact's email address.
- Subscription (`subscription_state`, text): Subscribed to receive the list's messages, or added as unsubscribed. Leave empty to subscribe. One of: `Subscribed`, `Unsubscribed`.
- Profile fields (`profile_fields`, object): Profile field values to save, each a profile field ID with its value, such as `1234`: `Gold`. List Profile Fields shows each field's ID.
- External contact ID (`external_contact_id`, text): The contact's ID in your own system.
- New email (`new_email`, text): Change an existing contact's email address to this one.
- Profile update (`update_type`, text): How profile fields are saved on an existing contact. Leave empty to update only the fields given. One of: `Update` (Update the fields given, keep the rest), `Append` (Add to the fields' existing values), `Overwrite` (Replace every profile field).
- Resubscribe if unsubscribed (`override_unsubscribe`, true/false): On to subscribe the contact again even if they unsubscribed. Only do this with their consent.
- Subscribed by the contact (`subscribed_by_contact`, true/false): On when the contact asked to subscribe themselves, such as through a sign-up form.
- Send double opt-in email (`send_double_opt_in`, true/false): On to email a new contact a confirmation link first.
- Events (`event_ids`, list): Events to raise for the contact once saved, which start the automations listening for them.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Create campaign

Create a campaign on a list.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Name (`name`, text, required): The campaign's name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Create event

Create an event on a list, for automations to listen for.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Name (`name`, text, required): The event's name.
- Status (`status`, text): Active events can be raised; blocked ones can't. One of: `Active`, `Blocked`. Default: `Active`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Create list

Create an email list.

**Inputs**

- Name (`name`, text, required): The list's name.
- Bounce handling (`bounce_handling`, text): How strictly bounced addresses are unsubscribed. One of: `Standard`, `Aggressive`, `None` (Don't unsubscribe on bounces). Default: `Standard`.
- Bounces before unsubscribing (`bounce_unsubscribe_count`, number): How many bounces a contact may have before being unsubscribed. At least 1. Default: `3`.
- From email (`from_email`, text): The From address messages on the list use unless they set their own.
- From name (`from_name`, text): The From name messages on the list use unless they set their own.
- Double opt-in (`double_opt_in`, true/false): On to email new subscribers a link they must click before they are subscribed.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Delete campaign

Delete a campaign. Messages in it stay, without the campaign.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Campaign (`campaign_id`, number, required): The campaign, a label that groups messages for reporting. At least 1.

**Outputs**

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

**Example output**

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

### Delete list

Delete a list with its contacts and history. This can't be undone.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

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

### Get contact

Get a contact on a list by email address, with their subscription and profile fields.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Email (`email`, text, required): The contact's email address (or Listrak email key).

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "emailAddress": "example",
      "emailKey": "example",
      "externalContactID": "example",
      "resubscribeDate": "example",
      "segmentationFieldValues": [
        {
          "segmentationFieldGroupId": 1,
          "segmentationFieldId": 1,
          "value": "example"
        }
      ],
      "subscribeDate": "example",
      "subscribeMethod": "example",
      "subscriptionState": "example",
      "unsubscribeDate": "example",
      "unsubscribeMethod": "example"
    },
    "status": 1
  }
}
```

### Get list

Get a list's settings, such as its default sender and bounce handling.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "bounceHandling": "example",
      "bounceUnsubscribeCount": 1,
      "createDate": "example",
      "enableDoubleOptIn": true,
      "folderId": 1,
      "fromEmail": "example",
      "fromName": "example",
      "ipPoolId": 1,
      "listId": 1,
      "listName": "example"
    },
    "status": 1
  }
}
```

### Get message

Get a message's subject, sender, send date, status and content.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Message (`message_id`, number, required): The sent or scheduled message. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "bodyHtml": "example",
      "bodyText": "example",
      "campaignId": 1,
      "fromEmail": "example",
      "fromName": "example",
      "messageId": 1,
      "messageStatus": "example",
      "replyEmail": "example",
      "savedAudienceId": 1,
      "sendDate": "example",
      "subject": "example",
      "toName": "example"
    },
    "status": 1
  }
}
```

### Get message results

Get a message's totals: sends, opens, clicks, bounces, unsubscribes, conversions and revenue.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Message (`message_id`, number, required): The sent or scheduled message. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "averageOrderValue": 1,
      "bounceCount": 1,
      "clickCount": 1,
      "conversionCount": 1,
      "openCount": 1,
      "passAlongCount": 1,
      "readCount": 1,
      "revenue": 1,
      "sentCount": 1,
      "unsubscribeCount": 1,
      "visitCount": 1
    },
    "status": 1
  }
}
```

### List campaigns

List a list's campaigns, the labels messages are grouped under for reporting.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "campaignId": 1,
        "campaignName": "example"
      }
    ],
    "status": 1
  }
}
```

### List contacts

List a list's subscribed or unsubscribed contacts, optionally only those who (un)subscribed in a date range.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Subscription (`subscription_state`, text): Which contacts to list. Leave empty for subscribed contacts. One of: `Subscribed`, `Unsubscribed`.
- From (`start_date`, date and time): Only contacts who subscribed (or, for unsubscribed contacts, unsubscribed) at or after this time.
- To (`end_date`, date and time): Only contacts who subscribed (or unsubscribed) before this time.
- External contact ID (`external_contact_id`, text): Only the contact with this ID from your own system.
- Page cursor (`cursor`, text): Where the next page starts: the nextPageCursor of the page before. Leave empty for the first page.
- Records per page (`count`, number): How many records a page holds, up to 5000. Leave empty for 1000. From 1 to 5000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "emailAddress": "example",
        "emailKey": "example",
        "externalContactID": "example",
        "resubscribeDate": "example",
        "segmentationFieldValues": [
          {
            "segmentationFieldGroupId": 1,
            "segmentationFieldId": 1,
            "value": "example"
          }
        ],
        "subscribeDate": "example",
        "subscribeMethod": "example",
        "subscriptionState": "example",
        "unsubscribeDate": "example",
        "unsubscribeMethod": "example"
      }
    ],
    "nextPageCursor": "example",
    "status": 1
  }
}
```

### List conversations

List a list's conversations, Listrak's automated message series.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "campaignId": 1,
        "conversationId": 1,
        "conversationName": "example",
        "expirationDate": "example",
        "status": "example"
      }
    ],
    "status": 1
  }
}
```

### List events

List a list's events, which start automations when raised for a contact.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "eventGroupId": 1,
        "eventId": 1,
        "eventName": "example",
        "status": "example"
      }
    ],
    "status": 1
  }
}
```

### List lists

List the email lists in your Listrak account.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "bounceHandling": "example",
        "bounceUnsubscribeCount": 1,
        "createDate": "example",
        "enableDoubleOptIn": true,
        "folderId": 1,
        "fromEmail": "example",
        "fromName": "example",
        "ipPoolId": 1,
        "listId": 1,
        "listName": "example"
      }
    ],
    "status": 1
  }
}
```

### List message activity

List what each contact did with a message: opened, clicked, bounced, unsubscribed or ordered.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Message (`message_id`, number, required): The sent or scheduled message. At least 1.
- Date range applies to (`date_type`, text): Whether the date range applies to when the message was sent or when the contact acted. Leave empty for when it was sent. One of: `Send` (When it was sent), `Activity` (When the contact acted).
- From (`start_date`, date and time): Only activity from this time.
- To (`end_date`, date and time): Only activity before this time.
- Email (`email`, text): Only this contact's activity.
- Page cursor (`cursor`, text): Where the next page starts: the nextPageCursor of the page before. Leave empty for the first page.
- Records per page (`count`, number): How many records a page holds, up to 5000. Leave empty for 1000. From 1 to 5000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "abuse": true,
        "activityDate": "example",
        "bounce": true,
        "bounceReason": "example",
        "click": true,
        "clickCount": 1,
        "emailAddress": "example",
        "externalContactID": "example",
        "open": true,
        "orderTotal": 1,
        "read": true,
        "sendDate": "example",
        "unsubscribe": true
      }
    ],
    "nextPageCursor": "example",
    "status": 1
  }
}
```

### List messages

List the messages sent or scheduled on a list, optionally within a date range.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- From (`start_date`, date and time): Only messages sent at or after this time.
- To (`end_date`, date and time): Only messages sent before this time.
- Include test messages (`include_test_messages`, true/false): On to include test sends.
- Page cursor (`cursor`, text): Where the next page starts: the nextPageCursor of the page before. Leave empty for the first page.
- Records per page (`count`, number): How many records a page holds, up to 5000. Leave empty for 1000. From 1 to 5000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "campaignId": 1,
        "externalCampaignId": "example",
        "messageId": 1,
        "messageStatus": "example",
        "sendDate": "example",
        "subject": "example"
      }
    ],
    "nextPageCursor": "example",
    "status": 1
  }
}
```

### List profile field groups

List the groups a list's profile fields are kept in.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "position": 1,
        "segmentationFieldGroupId": 1,
        "segmentationFieldGroupName": "example"
      }
    ],
    "status": 1
  }
}
```

### List profile fields

List the profile fields in a group, with the ID each is saved by.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Profile field group (`field_group_id`, number, required): The profile field group. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "dataType": "example",
        "maxLength": 1,
        "position": 1,
        "segmentationFieldGroupId": 1,
        "segmentationFieldId": 1,
        "segmentationFieldName": "example"
      }
    ],
    "status": 1
  }
}
```

### List saved audiences

List a list's saved audiences, the segments messages can be sent to.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "lastModified": "example",
        "name": "example",
        "savedAudienceId": 1
      }
    ],
    "status": 1
  }
}
```

### List transactional messages

List a list's transactional messages, such as order confirmations, that can be sent to one contact at a time.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "campaignId": 1,
        "externalCampaignId": "example",
        "subject": "example",
        "transactionalMessageId": 1,
        "transactionalMessageName": "example"
      }
    ],
    "status": 1
  }
}
```

### Rename campaign

Change a campaign's name.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Campaign (`campaign_id`, number, required): The campaign, a label that groups messages for reporting. At least 1.
- Name (`name`, text, required): The campaign's new name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Send transactional message

Send a transactional message to one contact, filling its profile fields with the values given.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Transactional message (`transactional_message_id`, number, required): The transactional message, set up in Listrak, to send. At least 1.
- Email (`email`, text, required): The contact's email address.
- Profile fields (`profile_fields`, object): Profile field values to save, each a profile field ID with its value, such as `1234`: `Gold`. List Profile Fields shows each field's ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Unsubscribe contact

Unsubscribe a contact from a list, so they get none of its messages.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Email (`email`, text, required): The contact's email address.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```

### Update list

Change a list's name, default sender or bounce handling. Fields left empty stay as they are.

**Inputs**

- List (`list_id`, number, required): The Listrak list (an email audience with its own contacts and messages). At least 1.
- Name (`name`, text): The new name.
- From email (`from_email`, text): The new default From address.
- From name (`from_name`, text): The new default From name.
- Bounce handling (`bounce_handling`, text): How strictly bounced addresses are unsubscribed. One of: `Standard`, `Aggressive`, `None` (Don't unsubscribe on bounces).
- Bounces before unsubscribing (`bounce_unsubscribe_count`, number): How many bounces a contact may have before being unsubscribed. At least 1.
- Double opt-in (`double_opt_in`, true/false): On to email new subscribers a confirmation link.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "resourceId": "example",
    "status": 1
  }
}
```
