Fundamental utilities
- Get supplements (getSupplementRecords method)
- Get products (getProducts method)
- Get order data (getOrders method)
- Get event data (getEventRecords method)
- Get JSON feeds (getJson method)
- Get XML feed (getSimpleXML)
- Put and post JSON (putJSON & postJSON)
Cordial provides a series of custom Smarty utilities that allow you to read and write data and simplify complex personalization rules. The list in the right sidebar consists of fundamental utilities that are used to access data from several data collections in your account. For a complete list of available utilities, see the Cordial utilities reference page.
Use JSON Pretty Print
For any of the above methods, it is useful to use the Smarty utility {$utils->jsonPrettyPrint($array)}
(value for $array
is required) to view all data available from the Get Method within the message preview.
For example, you can retrieve all product data available to a message by pasting the following code in the HTML editor and clicking the Preview button.
{$products=$utils->getProducts()}
{$utils->jsonPrettyPrint($products)}
This will work for all Get Data Array methods, as well as retrieving contact attribute data.
Comments
0 comments
Please sign in to leave a comment.