Syncing Multiple Orders

Sending Order Data to Project Agora Commerce

To send multiple 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

Multiple orders

In case you want to send multiple different orders you will have to separate them like different objects inside the "order" object

For multiple orders (for example for two different sessionIds) the context would be the below:

{
    "orders": [
       {
        "orderDate": "2019-12-02T15:00:00Z",
        "sessionId": "23dn3923-323d",
        "orderItems": [
            {
                  "gtin": "9891998566P",
                  "quantity": 5,
                  "regularUnitPrice": "1.00",
                  "totalOrderItemPriceAfterDiscounts": "5.00"
                }
              ]
            },
                {
        "orderDate": "2019-12-02T15:07:05Z",
        "sessionId": "27on8827-679d",
        "orderItems": [
            {
                  "gtin": "9891998566P",
                  "quantity": 5,
                  "regularUnitPrice": "1.00",
                  "totalOrderItemPriceAfterDiscounts": "5.00"
                }
              ]
            }   
    ]
}

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

sessionId

This is a generated id that you control that identifies a user's session. Project Agora Commerce can use this for purchase attribution.

Required

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 "gtin" fields in the "orderItems" object should be filled with the "pa-id" fields taken from the responses of an SPL, DSPL or Banner request and in the cases of the site's organic products (not belonging in the Project Agora Commerce formats) they should be filled with the respective "pa-id" values taken from the product feed for those products.

It is important to save the value of "pa-id" in each step so as to use it in a later stage when sending the order object with the API

Last updated