JSON: A New Method for Sharing Orders and Carts with Bronto

Jonathan Kremer

Jonathan Kremer

*Please note that this post applies only to customers who are using Bronto’s Cart Recovery app.

Order and cart data is incredibly valuable for your marketing efforts because it helps you deliver more insightful and targeted content to your visitors, shoppers and customers. This data becomes even more valuable when paired with a powerful app like Bronto’s Cart Recovery, but only if your data passes accurately into the Bronto Marketing Platform.

While there are multiple ways to share this data with Bronto, we’d like to highlight the preferred method: a JSON object. JSON, short for JavaScript Object Notation, is syntax for storing and exchanging data. It is an easier alternative to XML and generally exists unseen in the background of a site.

Providing the Bronto JavaScript with a JSON object to parse has some distinct advantages. First and foremost, a JSON object generated and hidden on the page is not impacted by page design or structure, which means the data passed to Bronto will be exactly the same no matter what version (mobile, desktop, etc.) of a site a customer is viewing. Visual changes to the site don’t affect the JSON object either, which helps ensure that the data flowing into Bronto remains consistent. In addition, because the JSON object is not a visual component, it can share information that is not displayed to users. For example, fields such as description or SKU can be passed to Bronto even though they are not visible elsewhere on the site.

When using a JSON object to send cart and order data into Bronto, it is important to structure the object correctly. JSON data is represented as a set of name and value pairs with field names and string values enclosed in double quotes (“fieldname”:”value”). The value for currency fields should be represented as a number with two places of precision after the decimal place. Line items and their corresponding data should be represented in an array where each array element represents an individual line item.

While the only required field is Grand Total, each additional field passed in can be used to personalize order and cart recovery messages being sent through Bronto. Additionally, order and cart data can be used to segment contacts and trigger automated workflows.

Here is an example of a JSON cart object that can be consumed by the Bronto JavaScript:

JSON exampleOur goal is to continue making it easier for you to incorporate order and cart information into what you’re doing in Bronto so that your messages and campaigns are more targeted and personalized and your efforts pack a bigger punch.

Like JSON? Let us know with a comment below.