How can we help?



The products collection contains all product data related to a product catalog. Product data can be used to personalize message content.

The most common product-related attributes are provided by default as part of the schema, including product name, category, price, and other related data. Some attributes are set as arrays and can include customizable name/value pairs such as color:blue and size:large.

You can learn more about product attributes in this API article.

How Cordial stores products

Product records are stored in the products collection as JSON objects.

Below is a simple example of how a product is stored in Cordial. It shows the standard fields of productID, productName, and price, as well as an array of variants containing the SKU and product attributes.

    "productID": "skirt0912",
    "productName": "Denim Skirt",
    "price": 19.99,
    "variants": [
        "sku": "skirt0912",
        "attr": {
          "color": "blue",
          "size": "8"

Import products

A product catalog is loaded into Cordial via the API.

In addition to Cordial's API, product data can be added by the JavaScript listeners on your website. The crdl(cartitem) method adds data about the products placed in the shopping cart by site visitors. Similarly, the crdl(order) method adds data associated with a purchase event, including the supplied product details.

Products are automatically added to the products collection when an order event is received. This allows marketers to take advantage of product data without having to import an entire product catalog.

View products

A product collection can be viewed within the UI or via an API call.

1. To view a product collection in the UI, navigate to Data > Product Data. You will see a list of all the products in the collection. The collection can be viewed as a table, thumbnails, or list.

2. To view details of each product in JSON format, hover over the arrow in the product row.

Use products in a message

Message content can be personalized with products from your catalog using the Smarty getProducts method.

Use case

You could use this method to send contacts a message showing items on sale or recently added products.

Display products in a message based on past orders

When displaying products in a message based on an order, we recommend that you use product data from the product catalog as opposed to product data from the order. This is because product catalog data (branding, images, and descriptions) may be more up to date than product data stored with an order that happened in the past.

Use case

You could send a message to a contact who ordered a product last year. If you're updating your product catalog on a regular basis, the product images may be different at the time the message is sent. Using Smarty, you can reference the product ID from the order and connect that to the product data stored in the product catalog. This way you can display the most recent updates to the product.


In the next article, you can learn about orders.



Please sign in to leave a comment.