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
| Action | What it does |
|---|---|
| Create contact | Create a contact with their email address, subscription status, lists and attributes. |
| Create contact event | Record a custom event, such as a browse or a sign-up, on a contact. |
| Create list | Create a contact list. |
| Create or update product | Add a product to the catalog, or replace it if a product with the same ID exists. |
| Create order | Record a contact's order with its items, for revenue reporting and order-based messages. |
| Delete contact | Delete a contact and their attribute values. |
| Delete list | Delete a list. |
| Delete order | Delete an order. |
| Delete product | Delete a product from the catalog. |
| Get contact | Get a contact with their channels, subscription status, lists and attributes. |
| Get list size | Get a list with the number of contacts on it. |
| Get order | Get an order with its items. |
| Get product | Get a product from the catalog. |
| List automation templates | List the automation templates, the saved messages that can be sent to one contact at a time. |
| List batch messages | List batch messages (one-off sends to an audience), optionally by status or send time. |
| 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. |
| List contacts | List contacts, or only those in a saved audience, with their channels and attributes. |
| List lists | List the account's contact lists. |
| List orders | List orders, optionally for one contact or purchased in a time range. |
| List products | List the products in Cordial's catalog. |
| Send automation template | Send an automation template's published message to a contact, with values for its variables. |
| Trigger orchestration | Start an orchestration (a multi-step journey) for a contact, with values for its variables. |
| Unsubscribe contact | Unsubscribe a contact from a channel, so they get no promotional messages on it. |
| Update contact | Change a contact's email address, subscription, lists or attributes. |
| Update list | Rename 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
- Email
emailtextRequired - The contact's email address.
- Email subscription
subscribe_statustext - Whether the contact gets promotional email. Leave empty for not subscribed yet.One of:
subscribed,unsubscribed,none(Not subscribed yet). - Add to lists
listslist - Lists to add the contact to.
- Attributes
attributesobject - 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 messages
suppress_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
- Email
emailtextRequired - The contact's email address.
- Event name
event_nametextRequired - The event's name, up to 40 characters, such as `browse`.
- When
timedate and time - When it happened. Leave empty for now.
- Properties
propertiesobject - 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
- Name
nametextRequired - The list's name, unique in the account.
- Track join dates
track_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 ID
product_idtextRequired - The product's ID.
- Name
nametextRequired - The product's name.
- Description
descriptiontext - The product's description.
- Price
pricenumber - The product's price.At least 0.
- Category
categorytext - The product's category.
- Page URL
urltext - The product page's address.
- Image URLs
imageslist - Image addresses.
- Tags
tagslist - Words that describe the product.
- In stock
in_stocktrue/false - On when it's in stock.
- Enabled
enabledtrue/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 ID
order_idtextRequired - Your order ID, unique in the account.
- Contact ID
contact_idtextRequired - The buyer's Cordial contact ID (cID), which Create contact returns.
- Purchase date
purchase_datedate and timeRequired - When the order was placed.
- Items
itemslistRequired - The items bought.
- Status
statustext - The order's status, such as `placed`.
- Store ID
store_idtext - The store it was placed in.
- Customer ID
customer_idtext - The buyer's ID in your store.
- Tax
taxnumber - The tax charged.At least 0.
- Shipping
shippingnumber - The shipping and handling charged.At least 0.
- Properties
propertiesobject - 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
- Contact
contacttextRequired - 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
- List
list_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 ID
order_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
- Product
product_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
- Contact
contacttextRequired - 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
- List
list_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 ID
order_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
- Product
product_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
- Tags
tagslist - Only templates with these message tags.
- Page
pagenumber - The page to return, starting at 1. Leave empty for the first.At least 1.
- Records per page
per_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
- Status
statustext - Only messages with this status.One of:
sent,pending(Scheduled),processing(Sending),paused,canceled. - Sent from
sincedate and time - Only messages sent at or after this time.
- Page
pagenumber - The page to return, starting at 1. Leave empty for the first.At least 1.
- Records per page
per_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 name
event_nametext - Only events with this name, such as `open`, `click`, `message-sent`, `optout` or your own.
- Email
emailtext - Only this contact's events.
- From
sincedate and time - Only events at or after this time.
- To
beforedate and time - Only events before this time.
- Records per page
per_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
- Email
emailtext - Only the contact with this email address.
- Saved audience key
audience_keytext - Only contacts in this saved audience rule, by its key.
- Page
pagenumber - The page to return, starting at 1. Leave empty for the first.At least 1.
- Records per page
per_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
- Name
nametext - 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
- Email
emailtext - Only this contact's orders.
- Contact ID
contact_idtext - Only orders of the contact with this cID.
- From
sincedate and time - Only orders bought at or after this time.
- To
beforedate and time - Only orders bought before this time.
- Order
sort_dirtext - Newest or oldest first.One of:
desc(Newest first),asc(Oldest first). - Page
pagenumber - The page to return, starting at 1. Leave empty for the first.At least 1.
- Records per page
per_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
- Page
pagenumber - The page to return, starting at 1. Leave empty for the first.At least 1.
- Records per page
per_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
- Template
template_keytextRequired - The automation template to send.
- Email
emailtextRequired - The recipient's email address.
- Variables
variablesobject - 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
- Orchestration
orchestration_idtextRequired - The orchestration to start.
- Email
emailtextRequired - The contact's email address.
- Variables
variablesobject - 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
- Contact
contacttextRequired - The contact's email address, or their Cordial contact ID (cID) written as `cID:` followed by the ID.
- Channel
channeltext - 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
- Contact
contacttextRequired - The contact's email address, or their Cordial contact ID (cID) written as `cID:` followed by the ID.
- New email
new_emailtext - The contact's new email address.
- Email subscription
subscribe_statustext - The contact's new email subscription.One of:
subscribed,unsubscribed,none(Not subscribed yet). - Resubscribe if unsubscribed
force_subscribetrue/false - On to subscribe a contact who had unsubscribed. Only do this with their consent.
- Add to lists
listslist - Lists to add the contact to.
- Remove from lists
remove_listslist - Lists to take the contact off.
- Attributes
attributesobject - 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 messages
suppress_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
- List
list_idnumberRequired - The list.At least 1.
- Name
nametext - The list's new name.
- Track join dates
track_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
}
}