Cordial

App · 25 actions

Manage Cordial contacts, lists, orders and products, record events, send automation templates, start orchestrations, and follow opens, clicks, unsubscribes and orders.

Actions

ActionWhat it does
Create contactCreate a contact with their email address, subscription status, lists and attributes.
Create contact eventRecord a custom event, such as a browse or a sign-up, on a contact.
Create listCreate a contact list.
Create or update productAdd a product to the catalog, or replace it if a product with the same ID exists.
Create orderRecord a contact's order with its items, for revenue reporting and order-based messages.
Delete contactDelete a contact and their attribute values.
Delete listDelete a list.
Delete orderDelete an order.
Delete productDelete a product from the catalog.
Get contactGet a contact with their channels, subscription status, lists and attributes.
Get list sizeGet a list with the number of contacts on it.
Get orderGet an order with its items.
Get productGet a product from the catalog.
List automation templatesList the automation templates, the saved messages that can be sent to one contact at a time.
List batch messagesList batch messages (one-off sends to an audience), optionally by status or send time.
List contact eventsList contact events, newest first, such as opens, clicks and your own custom events, optionally for one contact, event name or time range.
List contactsList contacts, or only those in a saved audience, with their channels and attributes.
List listsList the account's contact lists.
List ordersList orders, optionally for one contact or purchased in a time range.
List productsList the products in Cordial's catalog.
Send automation templateSend an automation template's published message to a contact, with values for its variables.
Trigger orchestrationStart an orchestration (a multi-step journey) for a contact, with values for its variables.
Unsubscribe contactUnsubscribe a contact from a channel, so they get no promotional messages on it.
Update contactChange a contact's email address, subscription, lists or attributes.
Update listRename a list or turn its join-date tracking on or off.

Create contact

Create a contact with their email address, subscription status, lists and attributes.

Inputs

EmailemailtextRequired
The contact's email address.
Email subscriptionsubscribe_statustext
Whether the contact gets promotional email. Leave empty for not subscribed yet.One of: subscribed, unsubscribed, none (Not subscribed yet).
Add to listslistslist
Lists to add the contact to.
Attributesattributesobject
Contact attribute values to save, each an attribute key with its value, such as `first_name`: `Jane`. The attributes must already exist in Cordial.
Suppress triggered messagessuppress_triggerstrue/false
Off to let messages that fire on attribute changes send for this contact. Cordial suppresses them unless told otherwise.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "cID": "example",
    "message": "example",
    "success": true
  }
}

Create contact event

Record a custom event, such as a browse or a sign-up, on a contact. Events can start orchestrations and build audiences.

Inputs

EmailemailtextRequired
The contact's email address.
Event nameevent_nametextRequired
The event's name, up to 40 characters, such as `browse`.
Whentimedate and time
When it happened. Leave empty for now.
Propertiespropertiesobject
Details of the event, each a name with its value, such as `product_id`: `p_8421`.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Create list

Create a contact list.

Inputs

NamenametextRequired
The list's name, unique in the account.
Track join datestrack_datestrue/false
On to record the date each contact joins the list.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Create or update product

Add a product to the catalog, or replace it if a product with the same ID exists.

Inputs

Product IDproduct_idtextRequired
The product's ID.
NamenametextRequired
The product's name.
Descriptiondescriptiontext
The product's description.
Pricepricenumber
The product's price.At least 0.
Categorycategorytext
The product's category.
Page URLurltext
The product page's address.
Image URLsimageslist
Image addresses.
Tagstagslist
Words that describe the product.
In stockin_stocktrue/false
On when it's in stock.
Enabledenabledtrue/false
On to show it in messages.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Create order

Record a contact's order with its items, for revenue reporting and order-based messages.

Inputs

Order IDorder_idtextRequired
Your order ID, unique in the account.
Contact IDcontact_idtextRequired
The buyer's Cordial contact ID (cID), which Create contact returns.
Purchase datepurchase_datedate and timeRequired
When the order was placed.
ItemsitemslistRequired
The items bought.
Statusstatustext
The order's status, such as `placed`.
Store IDstore_idtext
The store it was placed in.
Customer IDcustomer_idtext
The buyer's ID in your store.
Taxtaxnumber
The tax charged.At least 0.
Shippingshippingnumber
The shipping and handling charged.At least 0.
Propertiespropertiesobject
Other details, each a name with its value.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Delete contact

Delete a contact and their attribute values. This can't be undone.

Inputs

ContactcontacttextRequired
The contact's email address, or their Cordial contact ID (cID) written as `cID:` followed by the ID.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Delete list

Delete a list. Its contacts stay in the account.

Inputs

Listlist_idnumberRequired
The list.At least 1.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Delete order

Delete an order. This can't be undone.

Inputs

Order IDorder_idtextRequired
The order's ID.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Delete product

Delete a product from the catalog.

Inputs

Productproduct_idtextRequired
The product.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Get contact

Get a contact with their channels, subscription status, lists and attributes.

Inputs

ContactcontacttextRequired
The contact's email address, or their Cordial contact ID (cID) written as `cID:` followed by the ID.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "_id": "example",
    "attributes": {},
    "channels": {
      "email": {
        "address": "example",
        "subscribeStatus": "example"
      }
    },
    "lastModified": "example",
    "lists": [
      "example"
    ]
  }
}

Get list size

Get a list with the number of contacts on it.

Inputs

Listlist_idnumberRequired
The list.At least 1.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "count": 1,
    "id": 1,
    "name": "example"
  }
}

Get order

Get an order with its items.

Inputs

Order IDorder_idtextRequired
The order's ID.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "cID": "example",
    "customerID": "example",
    "email": "example",
    "items": [
      {
        "category": "example",
        "itemPrice": 1,
        "name": "example",
        "productID": "example",
        "qty": 1,
        "sku": "example"
      }
    ],
    "orderID": "example",
    "properties": {},
    "purchaseDate": "example",
    "shippingAndHandling": 1,
    "status": "example",
    "storeID": "example",
    "tax": 1
  }
}

Get product

Get a product from the catalog.

Inputs

Productproduct_idtextRequired
The product.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "category": "example",
    "description": "example",
    "enabled": true,
    "images": [
      "example"
    ],
    "inStock": true,
    "price": 1,
    "productID": "example",
    "productName": "example",
    "tags": [
      "example"
    ],
    "url": "example"
  }
}

List automation templates

List the automation templates, the saved messages that can be sent to one contact at a time.

Inputs

Tagstagslist
Only templates with these message tags.
Pagepagenumber
The page to return, starting at 1. Leave empty for the first.At least 1.
Records per pageper_pagenumber
How many records a page holds. Leave empty for Cordial's default.From 1 to 1000.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "channel": "example",
      "classification": "example",
      "ct": "example",
      "key": "example",
      "lm": "example",
      "name": "example",
      "tags": [
        "example"
      ]
    }
  ]
}

List batch messages

List batch messages (one-off sends to an audience), optionally by status or send time.

Inputs

Statusstatustext
Only messages with this status.One of: sent, pending (Scheduled), processing (Sending), paused, canceled.
Sent fromsincedate and time
Only messages sent at or after this time.
Pagepagenumber
The page to return, starting at 1. Leave empty for the first.At least 1.
Records per pageper_pagenumber
How many records a page holds. Leave empty for Cordial's default.From 1 to 1000.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "_id": "example",
      "bmID": "example",
      "channel": "example",
      "ct": "example",
      "name": "example",
      "sendTime": "example",
      "status": "example",
      "tags": [
        "example"
      ]
    }
  ]
}

List contact events

List contact events, newest first, such as opens, clicks and your own custom events, optionally for one contact, event name or time range.

Inputs

Event nameevent_nametext
Only events with this name, such as `open`, `click`, `message-sent`, `optout` or your own.
Emailemailtext
Only this contact's events.
Fromsincedate and time
Only events at or after this time.
Tobeforedate and time
Only events before this time.
Records per pageper_pagenumber
How many events to return. Leave empty for Cordial's default.From 1 to 1000.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "_id": "example",
      "a": "example",
      "action": "example",
      "ats": "example",
      "bmID": "example",
      "cID": "example",
      "email": "example",
      "mcID": "example",
      "properties": {},
      "time": "example"
    }
  ]
}

List contacts

List contacts, or only those in a saved audience, with their channels and attributes.

Inputs

Emailemailtext
Only the contact with this email address.
Saved audience keyaudience_keytext
Only contacts in this saved audience rule, by its key.
Pagepagenumber
The page to return, starting at 1. Leave empty for the first.At least 1.
Records per pageper_pagenumber
How many records a page holds. Leave empty for Cordial's default.From 1 to 1000.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "_id": "example",
      "attributes": {},
      "channels": {
        "email": {
          "address": "example",
          "subscribeStatus": "example"
        }
      },
      "lastModified": "example",
      "lists": [
        "example"
      ]
    }
  ]
}

List lists

List the account's contact lists.

Inputs

Namenametext
Only the list with this name.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "enhanced": true,
      "id": 1,
      "name": "example"
    }
  ]
}

List orders

List orders, optionally for one contact or purchased in a time range.

Inputs

Emailemailtext
Only this contact's orders.
Contact IDcontact_idtext
Only orders of the contact with this cID.
Fromsincedate and time
Only orders bought at or after this time.
Tobeforedate and time
Only orders bought before this time.
Ordersort_dirtext
Newest or oldest first.One of: desc (Newest first), asc (Oldest first).
Pagepagenumber
The page to return, starting at 1. Leave empty for the first.At least 1.
Records per pageper_pagenumber
How many records a page holds. Leave empty for Cordial's default.From 1 to 1000.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "cID": "example",
      "customerID": "example",
      "email": "example",
      "items": [
        {
          "category": "example",
          "itemPrice": 1,
          "name": "example",
          "productID": "example",
          "qty": 1,
          "sku": "example"
        }
      ],
      "orderID": "example",
      "properties": {},
      "purchaseDate": "example",
      "shippingAndHandling": 1,
      "status": "example",
      "storeID": "example",
      "tax": 1
    }
  ]
}

List products

List the products in Cordial's catalog.

Inputs

Pagepagenumber
The page to return, starting at 1. Leave empty for the first.At least 1.
Records per pageper_pagenumber
How many records a page holds. Leave empty for Cordial's default.From 1 to 1000.

Outputs

datalist
The response from Cordial.
Example output
{
  "data": [
    {
      "category": "example",
      "description": "example",
      "enabled": true,
      "images": [
        "example"
      ],
      "inStock": true,
      "price": 1,
      "productID": "example",
      "productName": "example",
      "tags": [
        "example"
      ],
      "url": "example"
    }
  ]
}

Send automation template

Send an automation template's published message to a contact, with values for its variables. Creates the contact if they're new.

Inputs

Templatetemplate_keytextRequired
The automation template to send.
EmailemailtextRequired
The recipient's email address.
Variablesvariablesobject
Values the message uses, each a name with its value, such as `orderID`: `o1234` (shown in the message as `{$extVars.orderID}`).

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Trigger orchestration

Start an orchestration (a multi-step journey) for a contact, with values for its variables. Creates the contact if they're new.

Inputs

Orchestrationorchestration_idtextRequired
The orchestration to start.
EmailemailtextRequired
The contact's email address.
Variablesvariablesobject
Values the orchestration's messages use, each a name with its value.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Unsubscribe contact

Unsubscribe a contact from a channel, so they get no promotional messages on it.

Inputs

ContactcontacttextRequired
The contact's email address, or their Cordial contact ID (cID) written as `cID:` followed by the ID.
Channelchanneltext
The channel to unsubscribe the contact from.One of: email, sms, push (Push notifications). Default: email.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Update contact

Change a contact's email address, subscription, lists or attributes. Fields left empty stay as they are.

Inputs

ContactcontacttextRequired
The contact's email address, or their Cordial contact ID (cID) written as `cID:` followed by the ID.
New emailnew_emailtext
The contact's new email address.
Email subscriptionsubscribe_statustext
The contact's new email subscription.One of: subscribed, unsubscribed, none (Not subscribed yet).
Resubscribe if unsubscribedforce_subscribetrue/false
On to subscribe a contact who had unsubscribed. Only do this with their consent.
Add to listslistslist
Lists to add the contact to.
Remove from listsremove_listslist
Lists to take the contact off.
Attributesattributesobject
Contact attribute values to save, each an attribute key with its value, such as `first_name`: `Jane`. The attributes must already exist in Cordial.
Suppress triggered messagessuppress_triggerstrue/false
Off to let messages that fire on attribute changes send.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

Update list

Rename a list or turn its join-date tracking on or off.

Inputs

Listlist_idnumberRequired
The list.At least 1.
Namenametext
The list's new name.
Track join datestrack_datestrue/false
On to record the date each contact joins the list.

Outputs

dataobject
The response from Cordial.
Example output
{
  "data": {
    "message": "example",
    "success": true
  }
}

On this page