Ecommerce Real-time Events

To use all Opti-X placement methods, the following events are considered mandatory:

Online Order, Product View, Add to cart, Remove from Cart , Empty Cart.

The Add to Wishlist and Remove from Wishlist events are optional. However, if these events are not implemented, any use cases that rely on them will not be available.

Online Order (Mandatory)

Online orders refer to confirming orders after adding items to the cart. Other Orders can be offline purchases or orders that do not fit the standard approach of online orders. One event of online order refers to one item ordered with a variable quantity.

Event KeyEvent NameType
ootb_online_orderOnline OrderSimple Event

Event’s Parameters:

Optional fields are marked with *

Parameter Key

Type

Example

Description

session_id*

String

248rhdbuw2her1

Users browser session.

userid

String

ExampleUser1234

Unique key identifying the user.

eventdatetime

Timestamp

2024-03-09 06:00:12.000

Date Time of the order.

product_id

String

RippedJeans1934256

Product Key

variant_id*

String

RippedJeans1934256-Blue

Key identifying the variant of the product

sku_id*

String

RippedJeans1934256-Blue-W28H30

Key identifying the sku of the variant.

brand

String

Example Brand

Brand of the item.

category

String

C-22149

Key Identifying the lowest level of category.

department

String

D-902es

Key Identifying the department or highest level of category.

url*

String

https://www.example.com/jeans/1934256

Link to the product

page_title*

String

Casual Ripped Blue Jeans

Title of the product’s page

page_category*

String

Clothing – Jeans

Category of the product’s page.

currency*

String

USD

Currency of the order

Item_name*

String

Casual Ripped Blue Jeans

Item Name

quantity*

Number

2

Quantity

total_pay*

Number

40

Total Pay of the item order with consideration to quantity (e.g. the original price total is 44.44 for 2 jeans, 10% discount was applied overall).

discount_percentage*

Number

10

Discount applied as a percentage

Item_order_id*

String

OI-1298840

Item Order ID

order_id

String

O-3sd82rhf

Order ID

tax_amount*

Number

2

Tax amount of the product with consideration to quantity.

delivery_fee*

Number

4.99

Delivery Fee (may come with other products).

fulfillment_type*

Enum

bopis
standard_delivery

  • *bopis- stands for "Buy Online, Pick Up In Store."standard_delivery** - refers to the standard cart with delivery method. Parameter is utilized in the "Recently Abandoned Cart" method within Recommend and helps create distinct workflows for in-store collection vs. home delivery customers

Product View (Mandatory)

Product views refer to product browsed on the ecommerce site. Fields related to variant and skus may be optional to accommodate for clients having separate pages for product variants and skus. If the site has a page to the product, and the user views a variant and sku under the same link, these must be provided as separate product view events with variant/sku fields populated.

Event KeyEvent NameType
ootb_product_viewProduct ViewSimple Event

Event’s Parameters:

Optional fields are marked with *

Event KeyTypeExampleDescription
session_id*String248rhdbuw2her1Users browser session.
useridStringExampleUser1234Unique key identifying the user.
eventdatetimeTimestamp2024-03-09 07:00:14.000Date Time of the order.
product_idStringSkMensSlipIn238745Product Key
variant_id*StringSkMensSlipIn238745-912Key identifying the variant of the product
sku_id*StringSkMensSlipIn238745-912-S6Key identifying the sku of the variant.
brandStringExampleBrandBrand of the item.
categoryStringC-9iu032Key Identifying the lowest level of category.
departmentStringD-290ijosKey Identifying the department or highest level of category.
url*Stringhttps://www.example.com/products/SkMensSlipIn238745Link to the product
page_title*StringMen's Slip In - Brand NewTitle of the product’s page
page_category*StringProducts - ShoesCategory of the product’s page.
currency*StringGBPCurrency of the order
Item_name*StringMen's Slip InItem Name
price*Number35.99Price at the time of product view. This should only consider what is shown on the site (some ecommerce sites show tax at checkout).

Add To Cart (Mandatory) & Remove From Cart (Mandatory)

Events related to adding and removing items from the cart. Add to cart, remove from cart and empty cart events are necessary for cart and product abandonment use cases.

Event KeyEvent NameType
ootb_add_to_cartAdd To CartSimple Event
ootb_remove_from_cartRemove From CartSimple Event

Event’s Parameters:

Optional fields are marked with *

Parameter Key

Type

Example

Description

session_id*

String

248rhdbuw2her1

Users browser session.

userid

String

ExampleUser1234

Unique key identifying the user.

eventdatetime

Timestamp

2024-03-09 07:00:14.000

Date Time of the event.

product_id

String

10Pencils1843

Product Viewed

variant_id*

String

10Pencils1843Coloured1234

Variant of the product viewed

sku_id*

String

10Pencils1843Coloured1234-23iuhw

Sku of the variant.

brand

String

Example Brand

Brand of the product.

category

String

C-P3nc1l

Key Identifying the lowest level of category.

department

String

D-St4t10n4ry

Key Identifying the department or highest level of category.

url*

String

https://www.example.com/product/10Pencils1843

Url of product or product-variant or sku.

page_title*

String

Coloured Pencils

Title of the page

page_category*

String

Pencils

Category of the page

currency

String

GBP

Currency

Item_name*

String

Coloured Pencils 10 pack.

Product/Variant/SkuName. Provide the lowest level.

quantity*

Number

Quantity

Quantity

total_price*

Number

30

Total Price. Consider quantity * price of the item, discount, * tax included.

tax_amount*

Number

2

Tax amount of the product with consideration to quantity.

delivery_fee*

Number

4.99

Delivery Fee

fulfilment_type*

Enum

bopis
standard_delivery

  • *bopis- stands for "Buy Online, Pick Up In Store."standard_delivery** - refers to the standard cart with delivery method. Parameter is utilized in the "Recently Abandoned Cart" method within Recommend and helps create distinct workflows for in-store collection vs. home delivery customers

Empty Cart (Mandatory)

Event where all items are removed from a cart. Add to cart, remove from cart and empty cart events are necessary for cart and product abandonment use cases. It is not necessary to also send ‘Remove from Cart’ events for each item for an empty cart event.

Event KeyEvent NameType
ootb_empty_cartempty_cartSimple Event

Event’s Parameters:

Optional fields are marked with *

Parameter Key

Type

Example

Description

session_id*

String

248rhdbuw2her1

Users browser session.

userid

String

ExampleUser1234

Unique key identifying the user.

eventdatetime

Timestamp

2024-03-09 07:00:14.000

Date Time of the order.

fulfillment_type*

Enum

bopis
standard_delivery

  • *bopis- stands for "Buy Online, Pick Up In Store."standard_delivery** - refers to the standard cart with delivery method. Parameter is utilized in the "Recently Abandoned Cart" method within Recommend and helps create distinct workflows for in-store collection vs. home delivery customers

Add To Wishlist (Optional) & Remove From Wishlist (Optional)

This event should be sent when a user adds a product to their wishlist, favorites list, or save-for-later area — indicating future purchase intent.

If the Add to Wishlist event is sent, the Remove from Wishlist event must also be implemented. Without it, the system will not be aware when a user removes an item from their wishlist, which may result in inaccurate communications—such as promoting products the user has already removed.

Event KeyEvent NameType
ootb_add_to_wishlistAdded to WishlistSimple Event
ootb_remove_from_wishlistRemoved from WishlistSimple Event

Event’s Parameters:

Optional fields are marked with *

Parameter KeyTypeExampleDescription
ootb_session_id*String"248rhdbuw2her1"User’s browser session.
ootb_wishlist_idString"248rhdbuw2he41"User’s wishlist identifier.
customerStringExampleUser1234Unique key identifying the user.
timestampTimestamp2024-03-09 07:00:14.000Date Time of the event.
ootb_product_idString"Sneakers93824"Product identifier.
ootb_variant_id*String"Sneakers93824-White9"Variant identifier.
ootb_sku_id*String"Sneakers93824-White9-S9"SKU identifier.
ootb_item_name*String"White High-Top Sneakers - Size 9"Name of the item.
ootb_brandString"ExampleBrand"Brand of the product.
ootb_categoryString"C-Footwear"Lowest-level category.
ootb_departmentString"D-Shoes"Top-level category or department.
ootb_urlString"https://www.example.com/sneakers/white9"Product or variant page URL.
ootb_page_title*String"White High-Top Sneakers"Product page title.
ootb_page_category*String"Footwear > Sneakers"Page category.
ootb_priceNumber89.99Price shown at the time of adding to wishlist.
currency*StringGBPCurrency
image_url*Stringhttps://www.example.com/images/products/sneakers93824-white9.jpgProduct image