To send order data to Project Agora Commerce, use a command similar to the command below. Note that the data in the "orders" field below is dummy data and is provided here only as an example.
Minimum Viable Order Context
Below is the minimum required context to sync orders. View the reference at the bottom of the page to see all supported fields.
In case you are sending multiple items in one order (this is the common case) , you will need to separate each object by the "," character as seen in the following example.
In this example we are sending two different SPL items in the same order:
In case you want to send multiple different orders you will have to separate them like different objects inside the "order" object.
In this example we are sending two different orders (made at a different time as shown in the orderDate field) one for an SPL item and one for a Static Banner:
If more than one products that show up in the landing page of a banner ,are added to cart and all of them are related with the banner campaign (you can see which products are related with a specific banner campaign in the response you get from us, and specifically in the gtins table), you have to choose one of them in random and send the order only once with the banner ad id and the respective pa_id(gtin) like in the example above.
and the user has made an order for the products with pa_ids: catpref--2899049P and catpref--2902620P, then you will have to chose in random only one of them to send like below:
While sending the order data for SPL or DSPL ads, it is important to remember that you will have to keep the values of ad id and pa_id for each sponsored product after getting the respective response from our system. An order shall be attributed to an SPL or DSPL item, either when the product has been added to cart from the "add to cart" button from a category page, either while added from the product details page when the user has been landed there after a click to the respective SPL or DSPL item.
The same applies for Banner ads. An order shall be attributed to a Banner item, when any product that exists in the landing page of the Banner ad and its pa_idis included in the Banner ad response, is added to the cart. So you will have to keep the ad id and pa_id values also in this case in order to use them when syncing the order.
Relevant Context Fields
String
Description
Required?
adId
The ad ID. This field should be populated if this order item has been bought as a result of a view or click on an ad.
Optional
citrusDiscountAmount
The amount of the Project Agora Commerce discount that was applied to the ad. The application to an ad of both a discount amount and additional constraints can cause the Project Agora Commerce discount value to be less than the maximum value of the original ad.
Required for Discounts
gtin
This is the pa_id as used in the xml product feed (catprefix--"SKU").
Required
id
This is the Id of the order you are pushing to Project Agora Commerce. Can be populated with the order Id maintained in the integrator's system. If no value is provided, one will be generated in the returned object.
Optional
orderDate
The date of the order. Required in ISO format.
Required
orderItems
The items included in the order being pushed to Project Agora Commerce.
Required
quantity
The number of the gtin purchased
Required
regularUnitPrice
The regular price of the item added to cart
Required
teamId
Your retailer teamId, this is used to identify the orders are coming from your team. Can be deduced from the API key.
Optional
totalOrderItemPriceAfterDiscounts
The whole order item price after all applicable discounts are applied, including the Project Agora Commerce discount.
Required
your_api_key_here
Your API key
Required
For a glossary of all terms in the documentation, see the reference
The "adId" and "gtins" fields in the "orderItems" object should be filled with the "id" and "pa-id" fields taken from the responses of an SPL, DSPL or Banner request.
It is important to save the values of "id" and "pa-id" in each step so as to use them in a later stage when sending the order object with the API