Guide Me on Order Service Using a JavaScript Code Implementation

Order Service is the method Bronto uses to automatically import order 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 Your JavaScript Code

When you implement Order Service using the JavaScript code implementation, you will need to do the following to build your JavaScript code sample:
  1. Copy the Order And Cart Capture JavaScript Snippet and paste it into a code editor.
  2. Delete any order fields you don't want to pass to Bronto from the example.
  3. 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.
  4. Replace the placeholder value with the order field code from your site.

    For example, replace 35.98 in "totalPrice": 35.98, with the code that's used to store order IDs on your site. This would look similar to "totalPrice": order.totalprice,.

Add JavaScript Code and Bronto Script Manager Code to Your Site

Now you need to add the JavaScript code you just constructed and Bronto's Script Manager code to your site.

The Script Manager code should be added to every page of your site.

The JavaScript snippet should be added to each page on your site that contains order data. This script currently does not capture cart data, so you only need to add it to order pages.

Configure Bronto Commerce Settings

Once the JavaScript snippet and Script Manager code are added to your site, you can configure Bronto to collect order data.

We also recommend exporting your order data from both Bronto and your commerce platform and running a comparison. Roughly 90% of the data from your site should be represented in your Bronto export file. If the data does not match, check the formatting of the JavaScript snippet.

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 JavaScript snippet 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 Commerce > Orders 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.