Get started: for developers – Cordial Knowledge Base

How can we help?

Overview

Developers get relevant data flowing into Cordial, empowering marketing teams to build dynamic audiences and send highly personalized messages. It's a foundational role for enterprise messaging.

Data collections overview

Watch this video for a quick overview of how data is used and managed in Cordial.

Click for sound

API-first and developer friendly

We built Cordial with developers in mind. A robust RESTful API is available, giving you access to virtually all of the platform's functionality using industry standard GET, POST, PUT, and DELETE calls. Cordial also provides a suite of JavaScript Listeners that can be embedded on your website for a seamless flow of real-time data to your account.

How Cordial stores data

Cordial uses a document-based and search-based database to store all data in the following collections.

Collection Description
Contact collection Stores data specific to a contact, including channels, attributes, list membership, and cart items.
Events (contact activities) collection Stores event data specific to messages (opens, clicks, etc.) or any custom-named event.
Product collection Stores data from a product catalog. Developers typically update this collection on a nightly or weekly basis. This data can be used in emails but not audience search.
Orders collection Stores order data. This can hold specific order details and can be used for building audiences.
Supplements collection Stores additional data (store locations, coupon codes, message content, etc.) that doesn’t fit into one of the above collections.

RESTful API

Cordial's API gives you access to virtually all of the platform's functionality, such as importing and exporting contacts, event, order, product, and message data—as well as sending batch and triggered messages and other job-related activities.

These articles will help get you started with our API:

In our documentation, API calls are grouped according to the following categories:

API testing

For testing and documentation needs, we built a custom implementation of Swagger to test all available API calls.

Before using Cordial APIs, you'll need to generate an API key.

Embedded JavaScript Listeners

Cordial's JavaScript Listeners can be embedded on your website to identify visitors and pass contact data, custom-named events, orders, and cart items to your account.

Our JavaScript Listeners also store anonymous data about site visitors and pass that data to the appropriate collection once a contact is identified.

Recommended data integrations

When using order data to send confirmation messages, we recommend using the API method.

Product data is also updated in the product collection when passed along with order data.

Integration tools

Our Scriptable API and Webhooks tools streamline the process of integrating Cordial into your tech stack.

Scriptable API

Cordial's Scriptable API allows you to set custom authentication, responses, and payload schemas that align with Cordial's data structure using Smarty scripts. This simplifies the process of connecting Cordial with other applications that provide value for your business.

Webhooks

Webhooks automatically stream real-time event data from Cordial to external application APIs. You can enable multiple Webhooks, each configured to stream a specified set of system and/or custom events to an external endpoint. This enables you to set up your own near-real-time streaming integrations with third-party APIs or your own internal APIs.

View History

View History is a feature to review the change history of Smarty-based assets in Cordial. View History gives you visibility into what changed, when it changed, and who made the change across your HTML Content, Automations, Data Automations, and Sculpt Blocks. Each asset maintains a paginated commit log, and you can open a side-by-side diff view to compare any two versions of the asset's code. View History is available from the list view operations menu for supported asset types. Contact your CSM to have this feature enabled.

When you open View History, you'll see a paginated list of changes for the selected asset. Each entry includes:

Compare two versions

  1. In the history list, select View changes on any entry.
  2. A side-by-side diff editor opens, showing the Before (older version) on the left and After (newer version) on the right.
  3. Additions and removals are highlighted inline so you can see exactly what Smarty logic changed between the two commits.

Additional resources