Guide Me on Order Service Using a JSON Object Implementation
Order Service is the method Bronto uses to automatically import order data (and sometimes cart data) from your site into your Bronto account. If you want to leverage our newest, and upcoming, offerings you will need to implement Order Service.
Construct a JSON Object
- Copy Bronto's example JSON object into a code editor.
- Delete any order fields you don't want to pass to Bronto from the example.
- Search the code that's used to build your site for the code that's used to store each order field you want to pass.
- Replace the placeholder value with the order field code from your site.
For example, replace
35.98
in"grandTotal": 35.98,
with the code that's used to store order IDs on your site. This would look similar to"grandTotal": order.endtotal,
.
- The JSON Object can contain a
<cartPhase>
element representing current stage of checkout. Phases include:SHOPPING
,BILLING
,SHIPPING_INFO
,SHIPPING_INFO
,ORDER_REVIEW
,PAYMENT
, andORDER_COMPLETE
. TheORDER_COMPLETE
cart phase is required to complete your order. If the cart phase is not set, it will default toSHOPPING
. - If mapped,
taxAmount
should have either 2 or 4 decimals places. grandTotal
andorderId
are required forORDER_COMPLETE
.- Only provide
emailAddress
if you providing a corresponding value or data can be incorrectly attributed to contacts. - Make sure you pass the full URL for
imageUrl
.
Add JSON Object and Bronto Tag Manager Code to Your Site
Now you need to add the JSON Object you just constructed and Bronto's Tag Manager code to your site.
The Tag Manager code should be added to each page on your site and the JSON Object needs to appear on every page you have a cart. The JSON object should load before the embed code. We recommend adding both to the footer for your site.
Configure Bronto Commerce Settings
Once the JSON object and embed code are added to your site, you can configure Bronto to collect cart and order data.
Set Up Data Loader Order or REST API Imports
We recommend using either the Bronto API or Data Loader as a backup method of importing order data. JavaScript has browser and configuration dependencies so we cannot guarantee the import of all order data when it is sent using the JSON object implementation method. Typically, this implementation will capture more than 90% of your traffic and configuring Data Loader or REST API imports helps ensure the other 10% will also be captured.
If you do not want to use the Bronto API, configure Data Loader to import order data.
Verify Your Order Data Is Being Imported Properly
The page can be used to check if your order data is being imported properly using Order Service. Use this 4-step guide to check that your Order Service implementation is properly configured.
We also recommend exporting your order data from both Bronto and your commerce platform and running a comparison.