Commanders Act X
Platform XDocumentationWelcome to Success
  • Welcome !
  • Platform updates
    • Announcements
    • Documentation updates
    • Release notes
  • Getting started
    • How the platform works
      • Glossary
        • Condensed platform concepts
    • Platform interface
      • Prod and Testing environments
      • Productivity tools
        • Commander's AI
    • Integrating your data
      • GTM Tutorial
      • OneTag Tutorial
      • Migration guides to the Platform X
        • Migrate from SSv1 to SSv2
          • Send data to serverside v2
            • Purchase event example (ssv1 to ssv2)
        • Migrate from old mobile sdk
  • Features
    • Sources
      • Sources Overview
      • Sources Catalog
        • Web
          • Web container
            • User guides for browser-side platform
              • Container
                • Hosting
                • Creation and modification
                • Generation
                • Testing
                • Deployment and roll back
                • Deletion
                • Statistics
                • Modification history
                • Javascript block
                • Branches
                • Plugin Commanders Act Assistant
              • Tags
                • Add tags
                • Configure tags
                • Rules
                  • Basic actions
                  • Triggers
                  • Perimeters & constraints
              • Data layer and data types
                • External variables
                • Internal variables
                • Event variables
                • Data storage
              • Deduplication
                • Setup guide
                • Setup example
                • Deduplication reports
              • TagPerformance
                • Setup guide
                • Report analysis
                • Troubleshooting
            • Setup guides for developers
              • Web container setup
              • Datalayer setup
              • Browser-side events setup
              • AMP
              • Angular
              • AngularJS
              • React
              • SPA implementation guide
              • VueJS
              • IOT & TV Apps
            • Best Practices
              • FAQ
              • Common Container Strategies
              • Common Trigger Strategies
              • Performance Optimization
              • tC.* attributes and methods
              • APIs
                • Onsite API
              • TMS & Consent banners IDs
          • Javascript SDK
            • Next.js serverside rendering
          • Pixel Tracking API
          • Google Tag Manager (GTM)
          • Shopify
        • Mobile APP
          • Android
          • iOS
          • Flutter
          • React native
        • Advertising
          • Bing Ads (cost import)
          • Facebook Ads (cost import)
          • Criteo (cost import)
          • Realytics
        • Import CRM users
          • API users
          • Users file importer
        • Import conversions
          • API Conversions and Product catalog
          • Conversions files importer
        • Product catalog
          • Product catalog files importer (FTP)
        • Server
          • HTTP tracking API source
            • (deprecated) HTTP tracking API source 1.0
          • Node.JS
          • Python
          • PHP
      • Source Live Event Inspector
      • Source data quality
    • Destinations
      • Destinations overview
        • Automatic Audience replay
      • Destinations catalog
        • AbTasty
        • Actito
        • Adform
        • Adobe
          • Adobe Analytics
          • Adobe Campaign
        • AdRoll
        • Adition
        • Adventori
        • Affilae
        • Alphalyr Marketing Studio
        • Amazon
          • Amazon Ads Conversions API
          • Amazon S3
        • Attraqt
        • Awin
        • Batch Audience
        • Branch Events
        • Button
        • Campaign Analysis Legacy
        • Commission Junction
        • Criteo
          • Criteo - Events
          • Criteo (audiences)
          • Criteo (offline conversions)
        • Data Activation Legacy
        • Dataventure
        • Destination Logs Exporter (closed beta)
        • Dialog-Mail
        • Dynamic Yield
        • Easyence
        • Effinity
        • Eloqua
        • Emarsys
        • Email export
        • Equativ Audience
        • Experian
        • Facebook
          • Facebook Conversions API
            • Facebook CAPI through GTM
            • Performance tab (Event Match Quality)
          • Facebook Custom Audiences
          • Facebook Lead Ads
        • FTP
        • Gamned
        • Google
          • Google Analytics 4
            • Google Analytics 4 - Proxy Mode
          • Google BigQuery
          • Google Conversion Adjustments
          • Google Customer Match
          • Google Display & Video 360
          • Google Enhanced Conversions
          • Google Enhanced Conversions for Leads
          • Google Floodlight Mobile App Conversion
          • Google Search Ads 360 Enhanced Conversions
          • Google Store Sales Direct
        • IBM
        • Inxmail
        • IntelliAd
        • Jellyfish
        • Kameleoon
          • Kameleoon Audience
          • Kameleoon Events
        • Kelkoo
        • Kwanko
        • LinkedIn Conversions API
        • Liveramp
        • Magento
        • Marin Software
        • Mapp
        • Matomo
        • MediaMath
        • Microsoft Advertising Universal Event Tracking
        • Mindlytix
        • Moebel
        • Nextdoor Conversion API
        • OXID
        • Optimizely
        • Outbrain
        • Partnerize
        • Piano Analytics
          • Piano Analytics Collection API
          • Piano Analytics Enrichment API
        • Pinterest
        • Piwik PRO
        • Prediggo
        • Qlik
        • Quantcast
        • Quora Ads Conversion API
        • Rakuten
          • Rakuten Audience
          • Rakuten Events
        • Realytics
        • Reddit Conversions API
        • Responsys
        • RhythmOne
        • Rich Relevance
        • RTB House Audience
        • Salesforce
          • Salesforce Audience Studio
          • Salesforce Marketing Cloud
          • Salesforce Commerce Cloud
        • SAP Commerce Cloud
        • Selligent
        • Skai
        • Smart Adserver
        • SmartFocus
        • Snapchat Conversions API
        • Splio
        • Syte
        • Tableau Online
        • Taboola
          • Taboola Audience
          • Taboola Events
        • Target2sell
        • Temelio
        • Teradata
        • The Trade Desk
          • The Trade Desk Conversions API
          • The Trade Desk Audience
        • TikTok
          • TikTok Events API
          • TikTok Offline Events
        • TimeOne
        • Tradedoubler
        • TradeTracker
        • X (Twitter) Conversion API
        • Xandr
        • Webhook
        • Webtrends
        • ZBO Media
        • Zeta
      • Destination builder
        • Javascript destination builder
          • Tutorial - How to build a server destination with the JS sandbox
          • Serverside javascript helpers
      • Destination filters
      • Mapping and Properties transformation
      • Event delivery
      • Destination event inspector
      • Dry mode (lab)
    • Enrichments
      • Augmented User Attributes
        • Business case
      • Events enrichment
      • Storage Settings
    • Data Quality
      • Event Specification
      • Sources data quality
      • Data cleansing
        • Supported transformation functions - Data cleansing
          • Format a date
    • Identity resolution
      • Migrate from Fuse v1 to Fuse v2
    • Customers
      • Segment
        • Segment overlap
        • Segment stats
    • Explore
      • Campaign analysis
        • Attribution
        • Control Group (Closed Beta )
      • User analysis
        • Dashboards
      • Consent Analysis
    • Consent management
      • Responsability of actors
      • Setup Guides
        • Tag Manager
          • Commanders Act TMS
          • Google Tag Manager (GTM)
          • Google Tag Manager (GTM) - Consent Mode
          • Google Consent Mode in Commanders Act CMP
          • Adobe Launch
        • Websites (Hardcoded)
        • FR : Suppression des cookies lors du retrait du consentement
        • Mobile apps
          • iOS
            • ATT - App Tracking Transparency (iOS 14.5+)
          • Android
      • User Guides
        • Categories & Tags
          • Manage Categories
          • Manage Vendors
          • Assign Categories
        • Privacy Banners
          • Banner Templates
            • Accessibility Template
          • Manage Banner
          • Deploy Banner
          • Copy Banner
        • Consent Analysis
        • Exports
        • Settings
      • Extensions
        • Cookie Scanner
        • Piggybacking
        • Tag Firewall
      • Marketing Preferences Center (additional module)
      • Knowledge Base
        • Consent Object
        • Consent cookies exemption
          • Implementation guide for exempted consent statistics FR market
        • Consent Cookie
        • IAB TCF V2.2 Release details
          • IAB TCF v2.2 CMP requirements
          • IAB TCF v2.2 Migration guide Web
          • IAB TCF v2.2 Migration guide App
        • IAB TCF V2.2 Consent
        • IAB TCF V2.2 and Google FAQ
        • Google ACM requires IAB TCF
        • CCPA & Global Privacy control
      • Rest Data API
        • GET/PUT Consents / preferences
      • OnSite API
        • Getting Started
        • consent.get
        • consent.update
        • consent.revoke
        • consent.onUpdate
        • consent.onReady
        • consentBanner.show
        • consentBanner.hide
        • consentCenter.show
        • consentCenter.hide
      • Platform API
        • Get statistics
  • Use cases
    • Data activation
      • Engage new customers
        • Welcome banner for new customers
        • Real-time promotion for hesitant customers
        • Discount banner for installing the application
        • Personalized ads
        • Engage similar audience (lookalike)
      • Increase loyalty
        • Drive to favourite store
        • Increase Customer Lifetime Value with a loyalty program
        • Notification about order delay
      • Increase revenue
        • Abandoned cart
        • Products recommendations
        • Complementary product offer
      • Retain customers
        • Identify a churn risk with RFM segmentation
        • Identify customers’ preferred channel
        • Contact with the customer support
      • Advocacy
        • Incentive to share customers' experience and rating
        • Sponsorship Program
        • Social Media Hashtag
    • Website performance
    • Consent banners A/B testing
    • Customer analysis
    • Campaigns performance analysis
  • Developers
    • Tracking & Integrations
      • Tracking
        • About events
          • E-commerce/retail events
          • Web event specificity
          • Mobile App event specificity
        • Events reference
          • Common events
          • E-commerce events
          • Video events
          • Campaign Tracking events
        • Properties reference
          • Global properties
          • Video properties
          • Permanent properties
        • Data API
          • HTTP API
          • Segment API
          • User API
          • Product catalog and conversion API
      • Server IP Whitelisting
    • Config API
    • Changelogs
      • Measure.js changelog
      • Web container generator
    • Content Security Policy
  • CONFIGURE
    • Data Management
      • Events collection
      • Data retention duration
      • Data Governance
    • Administration
      • User management
      • Domain Management
        • WAF Proxy (CloudFlare,...)
        • A record
        • CNAME record
        • On-Premise Proxy
        • Cookie CAID
        • First party hosting
      • Single Sign-On
      • Two-factor authentication (2FA)
      • Copy Management
    • Cookies
      • Cookie 1st
      • Cookie sync partners
      • First domain tracking (Phoenix)
    • Disclaimer
Powered by GitBook
On this page
  • add_payment_info
  • add_shipping_info
  • add_to_cart
  • add_to_wishlist
  • begin_checkout
  • generate_lead
  • purchase
  • refund
  • remove_from_cart
  • select_item
  • view_cart
  • view_item
  • view_item_list
  • - COMMON SCHEMAS -
  • Items
  • Product
  • User
  • - ENUMERATED VALUE -
  • Payment methods
  • Purchase status

Was this helpful?

Edit on GitHub
Export as PDF
  1. Developers
  2. Tracking & Integrations
  3. Tracking
  4. Events reference

E-commerce events

add_payment_info

This event signifies a user has submitted their payment information

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

payment_method

string

Yes

card

The chosen method of payment (see list of possible values below)

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list and is mandatory to manage consents. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

coupon

string

No

CHRISTMAS

Coupon code used for a purchase.

revenue

number

No

16.00

Revenue (shipping price and taxes excluded) after discount. ()revenue is typically required for meaningful reporting.

()currency is required if you set revenue.

currency

string (ISO 4217)

No

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

items

No

The items for the event.

Example

cact('trigger','add_payment_info', {
  payment_method: 'card',
  revenue: 16.00,
  currency: 'EUR',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val event = TCAddPaymentInfoEvent("card")
event.revenue = 16.00f
event.currency = "EUR"
serverside.execute(event)
TCAddPaymentInfoEvent event = new TCAddPaymentInfoEvent("card");
event.revenue = 16.6f;
event.currency = "EUR";
serverside.execute(event);
TCAddPaymentInfoEvent *event = [[TCAddPaymentInfoEvent alloc] initWithId: @"ID";
event.revenue = [[NSDecimalNumber alloc] initWithFloat: 16.00f];
event.currency = @"EUR";
[TCS execute: event];
let event = TCAddPaymentInfoEvent(payementMethod: "card")
	event?.revenue = 16.00
	event?.currency = "EUR"
	serverside?.execute(event)
var event = TCAddPaymentInfoEvent();
    event.paymentMethod = "card";
    event.revenue = 16.00;
    event.currency = "EUR";
serverside.execute(event);
{
    "event_name": "add_payment_info",
        "payment_method": "card",
        "revenue": 16.00,
        "value": 22.53,
        "currency": "EUR",
        "user": {
            "id": "12345",
            "email": "toto@domain.fr",
            "consent_categories": [
                1,
                3
            ]
        }
}

add_shipping_info

This event signifies a user has submitted their shipping information.

Parameters

Name
Type
Required
Example value
Description

currency

string (ISO 4217)

Yes

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue or valueparameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

value

number

Yes

22.53

The monetary value of the event (shipping price and taxes included) after discount

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

coupon

string

No

CHRISTMAS

Coupon code used for a purchase.

shipping_tier

string

No

Ground

The shipping tier (e.g. Next-day, Air`) selected for delivery of the purchased item.

items

Yes

The items for the event.

Example

cact('trigger','add_shipping_info', {
  value: 8.00,
  currency: 'EUR',
  coupon: 'promo',
  shipping_tier: 'ups',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCAddShippingInfoEvent(items,  112.5f, "EUR")
    event.coupon = "promo"
    event.shippingTier = "ups"
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCAddShippingInfoEvent event = new TCAddShippingInfoEvent(items, 112.5f, "EUR");
event.coupon = "promo";
event.shippingTier = "ups";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1"
                                  withPrice: [[NSDecimalNumber alloc] initWithString: @"1.5"]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2" 
                                  withName: @"pName2" 
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCAddShippingInfoEvent *event = [[TCAddShippingInfoEvent alloc] initWithItems: items
withValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"];

event.coupon = @"promo";
event.shippingTier = @"ups";
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCAddShippingInfoEvent(items: [item_1, item_2], withValue: 1, withCurrency: "EUR")
	event?.addAdditionalProperty("additionalKey", withBoolValue: true)
	event?.coupon = "promo"
	event?.shippingTier = "ups"
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 150;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
TCProduct tc_product_2 = TCProduct();
		tc_product_2.ID = "product_2_ID";
		tc_product_2.name = "product_2_name";
		tc_product_2.price = 150;
		tc_product_2.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_2 = TCItem();
		tc_item_2.ID = "item_2_id";
		tc_item_2.quantity = 2;
		tc_item_2.product = tc_product;
		tc_item_2.addAdditionalProperty("key_additional_item", "val_additional_product");

var event = TCAddShippingInfoEvent();
    event.coupon = "promo";
    event.shippingTier = "ups";
    event.currency = "EUR";
    event.items = [tc_item_1, tc_item_2];
serverside.execute(event);
{
    "event_name": "add_shipping_info",
        "shipping_tier": "Ground",
        "revenue": 16.00,
        "value": 22.53,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ],
                    "price": 9.99
                }
            },
            {
                "id": "SKU_12346",
                "quantity": 1,
                "price": 9.99,
                "variant": "green",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12346",
                    "name": "Heart tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "girl",
                    "brand": "Jenyfion",
                    "colors": [
                        "blue",
                        "white"
                    ],
                    "price": 9.99
                }
            }
        ],
        "user": {
            "id": "12345",
            "email": "toto@domain.fr",
            "consent_categories": [
                1,
                3
            ]
        }
}

add_to_cart

This event signifies that an item was added to a cart for purchase.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

value

number

Yes*

8.00

The monetary value of the event. ()value is typically required for meaningful reporting.

()currency is required if you set value.

currency

string (ISO 4217)

Yes*

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items for the event.

Example

cact('trigger','add_to_cart', {
  value: 8.00,
  currency: 'EUR',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCAddToCartEvent(22.53f,  "EUR", items)
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCAddToCartEvent event = new TCAddToCartEvent(22.53f,  "EUR", items);
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
                                  withName: @"pName2"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCAddToCartEvent *event = [[TCAddToCartEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withItems: items];
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCAddToCartEvent(value: 1, withCurrency: "EUR", withItems: [item_1, item_2])
	event?.addAdditionalProperty("additionalKey", withBoolValue: true)
	event?.currency = "EUR"
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 12.5;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");

var event = TCAddToCartEvent();
    event.currency = "EUR";
    event.items = [tc_item_1];
    event.value = 12.5;
serverside.execute(event);
{
    "event_name": "add_to_cart",
        "value": 8.00,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ]
                }
            }
        ]
}

add_to_wishlist

The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

value

number

No

8.00

The monetary value of the event. ()revenue is typically required for meaningful reporting.

()currency is required if you set revenue.

currency

string (ISO 4217)

No

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items for the event.

Example

cact('trigger','add_to_wishlist', {
  value: 8.00,
  currency: 'EUR',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCAddToWishlistEvent(items)
    event.value = 20.00f
    event.currency = "EUR"
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCAddToWishlistEvent event = new TCAddToWishlistEvent(items);
event.value = 20.00f;
event.currency = "EUR";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
    withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
    withName: @"pName1"
    withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
    withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
    withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
    withName: @"pName2"
    withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
    withQuantity: 2]];

TCAddToWishlistEvent *event = [[TCAddToWishlistEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withItems: items];
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCAddToWishlistEvent(items: [item_1, item_2])
	event?.currency = "EUR"
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 150;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");

var event = TCAddToWishlistEvent();
    event.addAdditionalPropertyWithIntValue("key_additional_1", 12);
    event.addAdditionalPropertyWithListValue("key_additional_2", [12,12,12]);
    event.currency = "EUR";
    event.items = [tc_item_1];
    event.value = 12.5;
serverside.execute(event);
{
    "event_name": "add_to_wishlist",
        "value": 8.00,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ]
                }
            }
        ]
}

begin_checkout

This event signifies that a user has begun a checkout.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

revenue

number

Yes

16.00

The monetary value of the event (shipping price and taxes excluded) after discount

value

number

Yes

22.53

The monetary value of the event (shipping price and taxes included) after discount

currency

string (ISO 4217)

Yes

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

coupon

string

No

CHRISTMAS

Coupon code used for a purchase.

id

string

No

0_12345

Transaction id. Used as key for updates

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items of the event.

Example

cact('trigger','begin_checkout', {
  id: 'O_12345',
  coupon: 'CHRISTMAS',
  revenue: 16.00,
  value: 20.33,
  currency: 'EUR',
  user: {
    id: '12356',
    email:'toto@domain.fr'
  },
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    price: 9.99,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      colors: ['red'],
      price: 9.99
    }
  }, {
    id: 'SKU_12346',
    quantity: 1,
    price: 9.99,
    variant: 'green',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12346',
      name: 'Heart tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'girl',
      brand: 'Jenyfion',
      colors: ['blue','white'],
      price: 9.99
    }
  }]
})
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCBeginCheckoutEvent(1.0f,  2.0f, "EUR", items)
    event.coupon = "CHRISTMAS"
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCBeginCheckoutEvent event = new TCBeginCheckoutEvent(1.0f,  2.0f, "EUR", items);
event.coupon = "CHRISTMAS";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1" 
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2" 
                                  withName: @"pName2" 
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCBeginCheckoutEvent *event = [[TCBeginCheckoutEvent alloc] initWithRevenue: [[NSDecimalNumber alloc] initWithString: @"1.1"]
withValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withItems: items];
event.coupon = @"CHRISTMAS";
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCBeginCheckoutEvent(revenue: 1, withValue: 3, withCurrency: "EUR", withItems: [item_1, item_2])
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 10;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
TCProduct tc_product_2 = TCProduct();
		tc_product_2.ID = "product_2_ID";
		tc_product_2.name = "product_2_name";
		tc_product_2.price = 5.10;
		tc_product_2.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_2 = TCItem();
		tc_item_2.ID = "item_2_id";
		tc_item_2.quantity = 2;
		tc_item_2.product = tc_product;
		tc_item_2.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCBeginCheckoutEvent();
    		event.coupon = "CHRISTMAS";
		event.items = [tc_item_1, tc_item_2];
serverside.execute(event);
{
    "event_name": "begin_checkout",
        "id": "O_12345",
        "coupon": "CHRISTMAS",
        "revenue": 16.00,
        "value": 22.53,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ],
                    "price": 9.99
                }
            },
            {
                "id": "SKU_12346",
                "quantity": 1,
                "price": 9.99,
                "variant": "green",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12346",
                    "name": "Heart tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "girl",
                    "brand": "Jenyfion",
                    "colors": [
                        "blue",
                        "white"
                    ],
                    "price": 9.99
                }
            }
        ],
        "user": {
            "id": "12345",
            "email": "toto@domain.fr",
            "consent_categories": [
                1,
                3
            ]
        }
}

generate_lead

Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

value

number

No*

9.99

The monetary value of the event. ()revenue is typically required for meaningful reporting.

()currency is required if you set revenue.

currency

string (ISO 4217)

No*

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

id

string

No

Lead id

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

Example

cact('trigger','generate_lead', {
  currency: 'EUR',
  value: 9.99,
  id: 'L_12345',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val event = TCGenerateLeadEvent(9.99f, "EUR")
event.ID = "L_12345"
serverside.execute(event)
TCGenerateLeadEvent event = new TCGenerateLeadEvent(9.99f, "EUR");
event.ID = "L_12345";
serverside.execute(event);
TCGenerateLeadEvent *event = [[TCGenerateLeadEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"];
event.ID = @"2b758628-f81b-454f-8e3d-867e8bc98523";
[TCS execute: event];
let event = TCGenerateLeadEvent(value: 1, withCurrency: "EUR")
    event?.ID = "2b758628-f81b-454f-8e3d-867e8bc98523";
    serverside.execute(event)
var event = TCGenerateLeadEvent();
    event.currency = "EUR";
    event.value = 9.99;
    event.ID = "2b758628-f81b-454f-8e3d-867e8bc98523";
serverside.execute(event);
{
    "event_name": "generate_lead",
        "method": "LinkedIn"
}

purchase

Fire this event when one or more items are purchased by a user.

Parameters (required and recommended)

Name
Type
Required
Example
Description

id

string

Yes

O_1245

Transaction id. Used as key for updates

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

All properties that you add here will be used as conditions for matching users in our database.

cosent_categories is automatically filled if you use Commanders Act CMP.

revenue

number

Yes

16.00

The monetary value of the event (shipping price and taxes excluded) after discount

value

number

Yes

22.53

The monetary value of the event (shipping price and taxes included) after discount

shipping_amount

number

No

3.33

Shipping cost associated with a transaction.

tax_amount

number

No

3.20

Tax associated with a transaction.

currency

string (ISO 4217)

Yes

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

coupon

string

No

CHRISTMAS

Coupon code used for a purchase.

type

string

Yes

offline

Type of conversion (online, offline, call etc.)

items

Yes

The items for the event.

payment_method

string

Yes

card

status

string

Yes

in_progress

last_channel

string

No

display

The last channel just before the purchase.

last_source

string

No

google.com

The last source (referrer) just before the purchase.

Automatically added by cact API

Name
Type
Required
Example
Description

url

string(url)

No

none

URL to the website where you can buy the item

Equivalent to window.location.href

Example

cact('trigger','purchase', {
  id: 'O_12345',
  coupon: 'CHRISTMAS',
  revenue: 16.00,
  value: 20.33,
  shipping_amount: 3.33,
  tax_amount: 3.20,
  currency: 'EUR',
  user: {
    id: '12356',
    email:'toto@domain.fr'
  },
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    price: 9.99,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      colors: ['red'],
      price: 9.99
    }
  }, {
    id: 'SKU_12346',
    quantity: 1,
    price: 9.99,
    variant: 'green',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12346',
      name: 'Heart tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'girl',
      brand: 'Jenyfion',
      colors: ['blue','white'],
      price: 9.99
    }
  }]
})
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCPurchaseEvent("O_12345", 16.0f,  22.53f, "EUR", "purchase", "CreditCard", "waiting", items)
    event.shippingAmount = 3.33f
    event.taxAmount = 3.20f
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCPurchaseEvent event = new TCPurchaseEvent("O_12345", 16.0f,  22.53f, "EUR", "purchase", "CreditCard", "waiting", items);
event.shippingAmount = 3.33f;
event.taxAmount = 3.20f;
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1" 
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1"
                                  withName: @"pName1"
                                  withPrice: [[NSDecimalNumber alloc] initWithString: @"1.5"]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
                                  withName: @"pName2"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCPurchaseEvent *event = [[TCPurchaseEvent alloc] initWithId: @"ID"
withRevenue: [[NSDecimalNumber alloc] initWithString: @"1.1"]
withValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withType: @"purchase"
withPaymentMethod: @"CreditCard"
withStatus: @"waiting"
withItems: items];

[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCPurchaseEvent(id: "purchaseID", withRevenue: 16.21, withValue: 23.10, withCurrency: "EUR", withType: "purchase", withPaymentMethod: "CreditCard", withStatus: "waiting", withItems: [item_1, item_2])
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 10;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
TCProduct tc_product_2 = TCProduct();
		tc_product_2.ID = "product_2_ID";
		tc_product_2.name = "product_2_name";
		tc_product_2.price = 5.10;
		tc_product_2.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_2 = TCItem();
		tc_item_2.ID = "item_2_id";
		tc_item_2.quantity = 2;
		tc_item_2.product = tc_product;
		tc_item_2.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCPurchaseEvent();
    		event.shippingAmount = 3.33;
    		event.taxAmount = 3.20;
    		event.revenue = 2.5;
		event.value = 12.2;
		event.currency = "EUR";
		event.type = "purchase";
		event.paymentMethod = "CreditCard";
		event.status = "waiting";
		event.items = [tc_item_1, tc_item_2];
serverside.execute(event);
{
    "event_name": "purchase",
        "id": "O_12345",
        "coupon": "CHRISTMAS",
        "revenue": 16.00,
        "value": 22.53,
        "shipping_amount": 3.33,
        "tax_amount": 3.20,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ],
                    "price": 9.99
                }
            },
            {
                "id": "SKU_12346",
                "quantity": 1,
                "price": 9.99,
                "variant": "green",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12346",
                    "name": "Heart tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "girl",
                    "brand": "Jenyfion",
                    "colors": [
                        "blue",
                        "white"
                    ],
                    "price": 9.99
                }
            }
        ],
        "user": {
            "id": "12345",
            "email": "toto@domain.fr",
            "consent_categories": [
                1,
                3
            ]
        }
}

refund

Fire this event when a purchase was refund

Parameters (required and recommended)

Name
Type
Required
Example
Description

id

string

Yes

O_1245

Transaction id. Used as key for updates

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

All properties that you add here will be used as conditions for matching users in our database.

cosent_categories is automatically filled if you use Commanders Act CMP.

revenue

number

Yes

16.00

The monetary value of the event (shipping price and taxes excluded) after discount

value

number

Yes

22.53

The monetary value of the event (shipping price and taxes included) after discount

shipping_amount

number

No

3.33

Shipping cost associated with a transaction.

tax_amount

number

No

3.20

Shipping cost associated with a transaction.

currency

string (ISO 4217)

Yes

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

coupon

string

No

CHRISTMAS

Coupon code used for a purchase.

type

string

Yes

offline

Type of conversion (online, offline, call etc.)

items

No*

(*) items is required for partial refunds but it can be omitted for full refunds.

Automatically added by cact API

Name
Type
Required
Example
Description

url

string(url)

No

none

URL to the website where you can buy the item

Equivalent to window.location.href

Example

cact('trigger','refund', {
  id: 'O_12345',
  coupon: 'CHRISTMAS',
  revenue: 16.00,
  value: 20.33,
  shipping_amount: 3.33,
  tax_amount: 3.20,
  currency: 'EUR',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
})
val event = TCRefundEvent("O_12345", 16.00f, 23.53f, "EUR", "offline")
    event.coupon = "CHRISTMAS"
    event.shippingAmount = 4.33f
    event.taxAmount = 3.20f
serverside.execute(event)
TCRefundEvent event = new TCRefundEvent("O_12345", 16.00f, 23.53f, "EUR", "offline");
event.coupon = "CHRISTMAS";
event.shippingAmount = 4.33f;
event.taxAmount = 3.20f;
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1"
                                  withName: @"pName1"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
                                  withName: @"pName2"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCRefundEvent *event = [[TCRefundEvent alloc] initWithID: @"2b758628-f81b-454f-8e3d-867e8bc98523"
withRevenue: [[NSDecimalNumber alloc] initWithString: @"20.2"]
withValue: [[NSDecimalNumber alloc] initWithString: @"26.2"]
withCurrency: @"EUR"
withType: @"offline"
withItems: items];

[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCRefundEvent(id: "purchaseID", withRevenue: 16.32, withValue: 23.1, withCurrency: "EUR", withType: "refund", withItems: [item_1, item_2])
	event?.shippingAmount = 11
	serverside?.execute(event)
var event = TCRefundEvent();
    event.currency = "EUR";
    event.value = 26.20;
    event.revenue = 20.20;
    event.coupon = "CHRISTMAS";
    event.shippingAmount = 4.33;
    event.taxAmount = 3.20;
    event.type = "offline";    
serverside.execute(event);
{
    "event_name": "refund",
        "value": 8.00,
        "currency": "EUR",
        "revenue": 16.00,
        "shipping_amount": 3.33,
        "tax_amount": 3.20
}

remove_from_cart

This event signifies that an item was removed from a cart.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

value

number

No

8.00

The monetary value of the event. ()value is typically required for meaningful reporting.

()currency is required if you set value.

currency

string (ISO 4217)

No

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items for the event.

Example

cact('trigger','remove_from_cart', {
  value: 8.00,
  currency: 'EUR',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)
val event = TCRemoveFromCartEvent(items)
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCRemoveFromCartEvent event = new TCRemoveFromCartEvent(items);
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
                                  withName: @"pName2"
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCRemoveFromCartEvent *event = [[TCRemoveFromCartEvent alloc] initWithItems: items];
event.value = [[NSDecimalNumber alloc] initWithString: @"12.2"];
event.currency = @"EUR";
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCRemoveFromCartEvent(items: [item_1, item_2])
	event?.value = 22.53
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 10;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCRemoveFromCartEvent();
		event.value = 15.1;
		event.currency = "EUR";		
		event.items = [tc_item_1];
serverside.execute(event);
{
    "event_name": "remove_from_cart",
        "value": 8.00,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ]
                }
            }
        ]
}

select_item

This event signifies an item was selected from a list.

Parameters

Name
Type
Required
Example value
Description

item_list_name

string

No

Related products

The name of the list in which the item was presented to the user.

items

Yes

The items for the event. The items array is expected to have a single element, representing the selected item.

Example

cact('trigger','select_item', {
  item_list_name: 'Related products',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCSelectItemEvent(items)
    event.itemListName = "Related products"
serverside.execute(event
TCSelectContentEvent event = new TCSelectContentEvent();
event.contentType = "product";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1" 
                                  withPrice:[[NSDecimalNumber alloc] initWithFloat: 1.5f]]
                                  withQuantity: 1]];

TCSelectItemEvent *event = [[TCSelectItemEvent alloc] initWithItems: items];
event.itemListName = @"Related products";

[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCSelectItemEvent(items: [item_1, item_2])
	event.itemListName = "Related products";
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 150;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCSelectItemEvent();
		event.itemListName = "Related products";
		event.items = [tc_item_1];
serverside.execute(event);
{
    "event_name": "select_item",
        "item_list_name": "Related products",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ]
                }
            }
        ]
}

view_cart

This event signifies that a user viewed their cart.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

value

number

No

8.00

The monetary value of the event. ()value is typically required for meaningful reporting.

()currency is required if you set value.

currency

string (ISO 4217)

No

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue parameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items for the event.

Example

cact('trigger','view_cart', {
  value: 8.00,
  currency: 'EUR',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCViewCartEvent(items);
    event.value = 15.1f
    event.currency = "EUR"
serverside.execute(event);
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCViewCartEvent event = new TCViewCartEvent(items);
event.value = 15.1f;
event.currency = "EUR";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1" 
                                  withPrice: [[NSDecimalNumber alloc] initWithString: @"1.5"]]
                                  withQuantity: 1]];

TCViewCartEvent *event = [[TCViewCartEvent alloc] initWithItems: items];
event.value = [[NSDecimalNumber alloc] initWithString: @"12.2"];
event.currency = @"EUR";

[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCViewCartEvent(items: [item_1, item_2])
	event?.value = 22.53
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 10;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
TCProduct tc_product_2 = TCProduct();
		tc_product_2.ID = "product_2_ID";
		tc_product_2.name = "product_2_name";
		tc_product_2.price = 5.10;
		tc_product_2.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_2 = TCItem();
		tc_item_2.ID = "item_2_id";
		tc_item_2.quantity = 2;
		tc_item_2.product = tc_product;
		tc_item_2.addAdditionalProperty("key_additional_item", "val_additional_product");

var event = TCViewCartEvent();
	event.value = 15.1;
	event.currency = "EUR";
	event.items = [tc_item_1, tc_item_2	
serverside.execute(event);
{
    "event_name": "view_cart",
        "value": 8.00,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ]
                }
            }
        ]
}

view_item

This event signifies that some content was shown to the user. Use this event to manage the most popular items viewed.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

revenue

number

Yes*

9.99

The monetary value of the event. ()revenue is typically required for meaningful reporting.

()currency is required if you set revenue.

currency

string (ISO 4217)

Yes*

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items for the event.

Example

cact('trigger','view_item', {
  value: 8.00,
  currency: 'EUR',
  items: [{
    id: 'SKU_12345',
    quantity: 1,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCViewItem(items)
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCViewItem event = new TCViewItem(items);
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1" 
                                  withPrice: [[NSDecimalNumber alloc] initWithString: @"1.5"]]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2" 
                                  withName: @"pName2" 
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCViewItem *event = [[TCViewItem alloc] initWithItems: items];
event.revenue = [[NSDecimalNumber alloc] initWithString: @"12.2"];
event.currency = @"EUR";

[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCViewItem(items: [item_1, item_2])
	event?.revenue = 12.2
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 150;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCViewItemEvent();
	event.pageName = "event_page_name";
	event.pageType = "event_page_type";
	event.items = [tc_item_1];
	event.addAdditionalPropertyWithIntValue("key_additional_1", 12);
	event.addAdditionalPropertyWithListValue("key_additional_2", [12,12,12]);
	event.addAdditionalPropertyWithMapValue("key_map", {'test': 12, "test2": "value"});
serverside.execute(event);
{
    "event_name": "view_item",
        "value": 8.00,
        "currency": "EUR",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ]
                }
            }
        ]
}

view_item_list

Log this event when the user has been presented with a list of items of a certain category.

Parameters

Name
Type
Required
Example value
Description

item_list_name

string

No

Related products

The name of the list in which the item was presented to the user.

user

Yes

{ id: '12345', email: 'toto@domain.fr',

consent_categories: [1,3]

}

consent_categories is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.

You should also add all user's properties in this user object, especially reconciliation key (id, email).

items

Yes

The items for the event.

Example

cact('trigger','view_item_list', {
  item_list_name: 'Related products',
   items: [{
    id: 'SKU_12345',
    quantity: 1,
    price: 9.99,
    variant: 'red',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12345',
      name: 'Trex tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'boy',
      brand: 'Lacoste',
      colors: ['red'],
      price: 9.99
    }
  }, {
    id: 'SKU_12346',
    quantity: 1,
    price: 9.99,
    variant: 'green',
    coupon: 'CHRISTMAS',
    discount: 1.99,
    product:{
      id: '12346',
      name: 'Heart tshirt',
      category_1: 'clothes',
      category_2: 't-shirts',
      category_3: 'girl',
      brand: 'Jenny',
      colors: ['blue','white'],
      price: 9.99
    }
  }],
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)

val event = TCViewItemList(items)
    event.itemListName = "your products"
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));

TCViewItemListEvent event = new TCViewItemListEvent(items);
event.itemListName = "your products";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID1" 
                                  withName: @"pName1" 
                                  withPrice: @1.5f]
                                  withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
                                  withProduct: [[TCProduct alloc] initWithProductId: @"pID2" 
                                  withName: @"pName2" 
                                  withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
                                  withQuantity: 2]];

TCViewItemListEvent *event = [[TCViewItemListEvent alloc] initWithItems: items];
event.itemListName = @"summer_collection";

[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)

let event = TCViewItemListEvent(items: [item_1, item_2])
	event?.itemListName = "summer_collection"
	serverside?.execute(event)
TCProduct tc_product = TCProduct();
		tc_product.ID = "product_1_ID";
		tc_product.name = "product_1_name";
		tc_product.price = 150;
		tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
		tc_item_1.ID = "item_1_id";
		tc_item_1.product = tc_product;
		tc_item_1.quantity = 1;
		tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
TCProduct tc_product_2 = TCProduct();
		tc_product_2.ID = "product_2_ID";
		tc_product_2.name = "product_2_name";
		tc_product_2.price = 150;
		tc_product_2.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_2 = TCItem();
		tc_item_2.ID = "item_2_id";
		tc_item_2.quantity = 2;
		tc_item_2.product = tc_product;
		tc_item_2.addAdditionalProperty("key_additional_item", "val_additional_product");

var event = TCViewItemListEvent();
	event.pageName = "event_page_name";
	event.pageType = "event_page_type";
	event.items = [tc_item_1, tc_item_2];
	event.addAdditionalPropertyWithIntValue("key_additional_1", 12);
	event.addAdditionalPropertyWithListValue("key_additional_2", [12,12,12]);
	event.addAdditionalPropertyWithMapValue("key_map", {'test': 12, "test2": "value"});
	event.itemListName = "itemListName";	
serverside.execute(event);
{
    "event_name": "view_item_list",
        "item_list_name": "Related products",
        "items": [
            {
                "id": "SKU_12345",
                "quantity": 1,
                "price": 9.99,
                "variant": "red",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12345",
                    "name": "Trex tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "boy",
                    "brand": "Lacoste",
                    "colors": [
                        "red"
                    ],
                    "price": 9.99
                }
            },
            {
                "id": "SKU_12346",
                "quantity": 1,
                "price": 9.99,
                "variant": "green",
                "coupon": "CHRISTMAS",
                "discount": 1.99,
                "product": {
                    "id": "12346",
                    "name": "Heart tshirt",
                    "category_1": "clothes",
                    "category_2": "t-shirts",
                    "category_3": "girl",
                    "brand": "Jenyfion",
                    "colors": [
                        "blue",
                        "white"
                    ],
                    "price": 9.99
                }
            }
        ],
        "user": {
            "id": "12345",
            "email": "toto@domain.fr",
            "consent_categories": [
                1,
                3
            ]
        }
}

- COMMON SCHEMAS -

Items

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

id

string

Yes

SKU_12345

The ID of an item.

If you don't have an item id, you can use the product id as value. This field is used as key for updates (ex : refund)

product

Yes

The product details

variant

string

No

red

The variant of the item.

list_position

number

No

1

The item's position in a list or collection.

discount

number

No

2.00

Monetary value of discount associated with a purchase

quantity

number

Yes

2

The quantity of the item.

affiliation

string

No*

DOWNLOAD

Required for most affiliation's destination.

coupon

string

No

CHRISTMAS

The coupon code associated with an item.

Product

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

id

string

Yes*

12345

The ID of the product (ex: in your product catalog database) The item.id and product.id do not have to be different. If they are different, typically the product.id is a database identifier, like 9714107479 and the item.id is a public-facing identifier like SKU-12345.

(*) If you have imported your product's catalog in the platform, the product.id corresponds to the unique product id in the catalog and can be used with id expansion feature.

name

string

Yes

Trex

Product name

price

number

Yes

14.99

The price of the product

currency

string (ISO 4217)

No

EUR

Currency of the price, in 3-letter ISO 4217 format.

If set, event-level currency is ignored. Multiple currencies per event is not supported. Each item should set the same currency.

category_1

string

No

T-Shirts

Product Category (context-specific). item_category2 through item_category5 can also be used if the product has many categories.

brand

string

No

Lacoste

Product brand

colors

Array[string]

No

[blue, white]

The color(s) of the product

size

string

No

128

Size of the article

User

When you send an event, it needs to carry enough information to identify which user made it. We can link events together using cookies. But destination partners require accurate identifiers to take actions.

id and email are usually the most useful parameters. Though some destination partners also use firstname, lastname, birthdate, city, ...

You won't always have all of those parameters. But it is recommended to send them as soon as you can during user's browsing.

Parameters (required and recommended)

Name
Type
Required
Example Value
Description

id

string

No*

845454

User's main identifier (e.g. CRM id)

(*) required for many destinations and internal processing.

email

string

Yes*

john.doe@example.com

Email (plain value)

(*) required for many destinations and internal processing. Not required if email_sha256 is provided

email_md5

string

No*

8eb1b52... (size 32)

email_sha256

string

No*

836f82d... (size 64)

phone

string

No*

+33612345678

firstname

string

No

John

First name

lastname

string

No

Doe

Last name

gender

string

No

m

Gender

  • f for Female

  • m for Male

birthdate

string

No

1970-01-01

Birth date, YYYY-MM-DD format

city

string

No

Boston

City

state

string

No

Massachusetts

State

zipcode

string

No

02108

Zip code

country

string

No

USA

consent_categories

Array

Yes

[1,2,3]

User's consent categories. Necessary to grant data sharing with destination partners. It is automatically filled from web sources if you use Commanders Act CMP.

About Hashing

In some cases, you won't be able to send a parameter plain value. It is either unavailable or restricted.

Every user.<property> can be sent under hashed format with algorithm suffix: _md5 or _sha256 (underscore followed by lowercase algorithm name)

Example :

{
  user: {
    email_md5: '8eb1b522f60d11fa897de1dc6351b7e8',                                      // md5('john.doe@example.com')
    email_sha256: '836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f',   // sha256('john.doe@example.com')
    phone_md5: '60dd761f55cb17f0532c9fb1679e8ddd',                                      // md5('+33612345678')
    phone_sha256: '42d573cfc315801d4cd8eddd5416b416a0bf298b9b9e12d6b07442c91db42bd8',   // sha256('+33612345678')
  }
}

No need to send both plain and hashed values :

  • if you send plain value, the hashed values aren't necessary We can generate hashed values on server side using plain value

  • if you don't send plain value, then you should fill as much hashed values as possible Partners require different hash algorithms and without plain value, we can't generate any hash. That's why we need the exact hashed value

- ENUMERATED VALUE -

Payment methods

Enumerated Values for payment methods :

Property
Value

payment_method

by_invoice

payment_method

by_bank_transfer_in_advance

payment_method

card

payment_method

check_in_advance

payment_method

cod

payment_method

coupon

payment_method

direct_debit

payment_method

online_payment_system

payment_method

other

Purchase status

Enumerated Values for purchase status:

Property
Value

status

canceled

status

delivered

status

in_progress

status

partially_delivered

status

partially_returned

status

partially_shipped

status

pending_shipment

status

returned

status

shipped

status

pending

PreviousCommon eventsNextVideo events

Last updated 8 months ago

Was this helpful?

Payment method type (see list of below)

Status of the conversion (see list of below). Conversions with status "pending" are not included in default sum and counts aggregated on augmented user attributes feature

Email, hashed using . Not required if email is provided (see below)

Email, hashed using . Not required if email is provided (see below)

Phone number, format (*) required for some destinations.

Country code, ISO 3166-1 or formats

Thus it might be possible to send the hashed values. We currently accept 2 algorithm : and .

we only support hex (base16) encoding (i.e.: hashed values are carried by strings with [0-9a-f] characters) Other encodings are not supported yet

ℹ️
md5
sha256
MD5 algorithm
SHA-256 algorithm
E.164
2-letter
3-letter
Object<User>
Array<Items>
Object<User>
Array<Items>
Object<User>
Array<Items>
Object<User>
Array<Items>
Object<User>
Array<Items>
Object<User>
Object<User>
Array<Items>
possible values
possible values
Object<User>
Array<Items>
Object<User>
Array<Items>
Array<Items>
Object<User>
Array<Items>
Object<User>
Array<Items>
Object<User>
Array<Items>
Object<Product>