> For the complete documentation index, see [llms.txt](https://doc.commandersact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/events-reference.md).

# Référence des événements

Dans cette section, vous trouverez toutes les références d'événements prises en charge par Commanders Act.

## Introduction

Chaque événement nécessite certaines propriétés.

Dans tous les cas, les propriétés suivantes sont obligatoires :

* `event_name`
* `context.event_id`
* `context.event_timestamp`

Remarque : le [tag](https://doc.commandersact.com/fr/prise-en-main/integrating-your-data/onetag-tutorial.md) et les [SDK mobiles](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/about-events/mobile-sdk-event-specificity.md) Commanders Act ajoutent automatiquement les propriétés de contexte.

Cette section présente la liste de tous nos événements standard, ainsi que les propriétés standard obligatoires ou facultatives.

{% content-ref url="/pages/e3e7dd697c38e7b5ead87dcb5fca7911f7322d28" %}
[Événements communs](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/events-reference/common-events.md)
{% endcontent-ref %}

{% content-ref url="/pages/30b192cf2f5cd53f15e2aafb3f9d39a95c87294b" %}
[Événements e-commerce](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/events-reference/e-commerce-events.md)
{% endcontent-ref %}

{% content-ref url="/pages/e72f58b750273a16713c52baa7f389a3db67079e" %}
[Événements vidéo](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/events-reference/video-event-reference.md)
{% endcontent-ref %}

{% content-ref url="/pages/4beb146c604322ecdd5f57f62650b2815a2b0c46" %}
[Événements Campaign Tracking](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/events-reference/campaign-analytics-module-events.md)
{% endcontent-ref %}

Si le type d'événement ou les propriétés que vous recherchez ne sont pas mentionnés dans cette section, vous pouvez tout de même envoyer des événements et des propriétés personnalisés. Toutefois, la propriété `event_name` reste obligatoire.\
\
Voici les événements les plus utilisés :

## add\_payment\_info <a href="#add_payment_info" id="add_payment_info"></a>

Cet événement indique qu'un utilisateur a soumis ses informations de paiement.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="137">Nom</th><th width="101">Type</th><th width="76">Obligatoire</th><th width="147">Exemple de valeur</th><th width="288">Description</th></tr></thead><tbody><tr><td><code>payment_method</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>card</td><td>Mode de paiement choisi (voir la liste des valeurs possibles ci-dessous)</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l'utilisateur et est obligatoire pour gérer les consentements. Cette liste est renseignée automatiquement à partir des sources web si vous utilisez la CMP de Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>coupon</code></td><td><code>string</code></td><td>Non</td><td>CHRISTMAS</td><td>Code promo utilisé pour un achat.</td></tr><tr><td><code>revenue</code></td><td><code>number</code></td><td>Non</td><td>16.00</td><td><p>Chiffre d'affaires (hors frais de livraison et taxes <strong>exclus</strong>) après remise.<br>(<em>)<code>revenue</code> est généralement nécessaire pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est obligatoire si vous définissez <code>revenue</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td>Non</td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td>Non</td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %}
{% tab title="JavaScript" %}

```javascript
cact('trigger','add_payment_info', {
  payment_method: 'card',
  revenue: 16.00,
  currency: 'EUR',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCAddPaymentInfoEvent("card")
event.revenue = 16.00f
event.currency = "EUR"
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
TCAddPaymentInfoEvent event = new TCAddPaymentInfoEvent("card");
event.revenue = 16.6f;
event.currency = "EUR";
serverside.execute(event);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCAddPaymentInfoEvent *event = [[TCAddPaymentInfoEvent alloc] initWithId: @"ID";
event.revenue = [[NSDecimalNumber alloc] initWithFloat: 16.00f];
event.currency = @"EUR";
[TCS execute: event];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
let event = TCAddPaymentInfoEvent(payementMethod: "card")
	event?.revenue = 16.00
	event?.currency = "EUR"
	serverside?.execute(event)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCAddPaymentInfoEvent();
    event.paymentMethod = "card";
    event.revenue = 16.00;
    event.currency = "EUR";
serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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
            ]
        }
}
```

{% endtab %}
{% endtabs %}

## add\_shipping\_info

Cet événement indique qu’un utilisateur a envoyé ses informations de livraison.

#### Paramètres <a href="#parameters_2" id="parameters_2"></a>

<table><thead><tr><th width="138">Nom</th><th width="99">Type</th><th width="74">Obligatoire</th><th width="159">Exemple de valeur</th><th width="281">Description</th></tr></thead><tbody><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td>Oui</td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> ou <code>value</code>paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les métriques de revenus puissent être calculées avec précision.</p></td></tr><tr><td><code>value</code></td><td><code>number</code></td><td>Oui</td><td>22.53</td><td>Valeur monétaire de l’événement (prix de livraison et taxes <strong>compris</strong>) après remise</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>coupon</code></td><td><code>string</code></td><td>Non</td><td>CHRISTMAS</td><td>Code promo utilisé pour un achat.</td></tr><tr><td><code>shipping_tier</code></td><td><code>string</code></td><td>Non</td><td>Livraison terrestre</td><td>Niveau de livraison (par ex.  <code>Next-day</code>, Air`) sélectionné pour la livraison de l’article acheté.</td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %} \`

\`\`javascript 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] } });

````

</div>

<div data-gb-custom-block data-tag="tab" data-title='Kotlin (Android)'>

```kotlin
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)
````

```java
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);
```

```objectivec
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];
```

```swift
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)
```

```dart
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);
```

```json
{
    "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

Cet événement indique qu’un article a été ajouté au panier en vue de son achat.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="136">Nom</th><th width="103">Type</th><th width="102">Obligatoire</th><th width="135">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>value</code></td><td><code>number</code></td><td><strong>Oui</strong>*</td><td>8.00</td><td><p>La valeur monétaire de l’événement.<br>(<em>)<code>value</code> est généralement requise pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est requise si vous définissez <code>value</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td><strong>Oui</strong>*</td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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"
                    ]
                }
            }
        ]
}
```

{% endtab %} {% endtabs %}

## add\_to\_wishlist

Cet événement indique qu’un article a été ajouté à une liste de souhaits. Utilisez cet événement pour identifier les idées cadeaux populaires dans votre application.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="142">Nom</th><th width="100">Type</th><th width="80">Obligatoire</th><th width="157">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>value</code></td><td><code>number</code></td><td>Non</td><td>8.00</td><td><p>La valeur monétaire de l’événement.<br>(<em>)<code>revenue</code> est généralement nécessaire pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est obligatoire si vous définissez <code>revenue</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td>Non</td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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"
                    ]
                }
            }
        ]
}
```

{% endtab %} {% endtabs %}

## begin\_checkout <a href="#begin_checkout" id="begin_checkout"></a>

Cet événement indique qu’un utilisateur a commencé le processus de paiement.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="138">Nom</th><th width="98">Type</th><th width="78">Obligatoire</th><th width="157">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>revenue</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>16.00</td><td>La valeur monétaire de l’événement (prix de livraison et taxes <strong>exclus</strong>) après réduction</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>22.53</td><td>Valeur monétaire de l’événement (prix de livraison et taxes <strong>compris</strong>) après remise</td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td><strong>Oui</strong></td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>coupon</code></td><td><code>string</code></td><td>Non</td><td>CHRISTMAS</td><td>Code promo utilisé pour un achat.</td></tr><tr><td><code>id</code></td><td><code>string</code></td><td>Non</td><td>0_12345</td><td>ID de transaction. Utilisé comme clé pour les mises à jour</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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
    }
  }]
})
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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
            ]
        }
}
```

{% endtab %} {% endtabs %}

## generate\_lead <a href="#generate_lead" id="generate_lead"></a>

Enregistrez cet événement lorsqu’un lead a été généré afin de comprendre l’efficacité de vos campagnes de réengagement.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="134">Nom</th><th width="103">Type</th><th width="77">Obligatoire</th><th width="144">Exemple de valeur</th><th width="288">Description</th></tr></thead><tbody><tr><td><code>value</code></td><td><code>number</code></td><td><strong>Non</strong>*</td><td>9.99</td><td><p>La valeur monétaire de l’événement.<br>(<em>)<code>revenue</code> est généralement nécessaire pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est obligatoire si vous définissez <code>revenue</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td><strong>Non*</strong></td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>id</code></td><td><code>string</code></td><td>Non</td><td></td><td>ID du lead</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
cact('trigger','generate_lead', {
  currency: 'EUR',
  value: 9.99,
  id: 'L_12345',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCGenerateLeadEvent(9.99f, "EUR")
event.ID = "L_12345"
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
TCGenerateLeadEvent event = new TCGenerateLeadEvent(9.99f, "EUR");
event.ID = "L_12345";
serverside.execute(event);TCLoginEvent event = new TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);

```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCGenerateLeadEvent *event = [[TCGenerateLeadEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"];
event.ID = @"2b758628-f81b-454f-8e3d-867e8bc98523";
[TCS execute: event];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
let event = TCGenerateLeadEvent(value: 1, withCurrency: "EUR")
    event?.ID = "2b758628-f81b-454f-8e3d-867e8bc98523";
    serverside.execute(event)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCGenerateLeadEvent();
    event.currency = "EUR";
    event.value = 9.99;
    event.ID = "2b758628-f81b-454f-8e3d-867e8bc98523";
serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "generate_lead",
        "method": "LinkedIn"
}
```

{% endtab %} {% endtabs %}

## login <a href="#login" id="login"></a>

Envoyez cet événement pour indiquer qu’un utilisateur s’est connecté.

#### Paramètres <a href="#parameters_14" id="parameters_14"></a>

<table><thead><tr><th width="119">Nom</th><th width="103">Type</th><th width="77">Obligatoire</th><th width="224">Exemple</th><th>Description</th></tr></thead><tbody><tr><td><code>method</code></td><td><code>string</code></td><td>Non</td><td>LinkedIn</td><td>La méthode utilisée pour se connecter.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="Javascript" %}

```javascript
cact('trigger', 'login', {
  method: 'LinkedIn',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCLoginEvent()
event.method = "LinkedIn"
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
TCLoginEvent event = new TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCLoginEvent *event = [[TCLoginEvent alloc] init];
event.method = @"LinkedIn";
[TCS execute: event];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
let event = TCLoginEvent()
	event.method = "linkedin"
	serverside?.execute(event)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCLoginEvent();
    event.method = "LinkedIn";
    serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "login",
        "method": "LinkedIn"
}
```

{% endtab %} {% endtabs %}

## page\_view <a href="#page_view" id="page_view"></a>

L’ `page_view` appel vous permet d’enregistrer chaque fois qu’un utilisateur consulte une page de votre site web, ainsi que toute propriété facultative concernant cette page.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="144">Nom</th><th width="99">Type</th><th width="82">Obligatoire</th><th width="160">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>page_type</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>product_list</td><td><p>Catégorie de page. Types prédéfinis recommandés :</p><ul><li>home</li><li>landing</li><li>product_list</li><li>product</li><li>content_list</li><li>content</li><li>search</li><li>funnel</li><li>success</li><li>funnel_confirmation</li><li>account</li><li>cart</li><li>legal (par ex. politique de confidentialité)</li></ul><p>Équivalent de <code>tc_vars.env_template</code></p></td></tr><tr><td><code>page_name</code></td><td><code>string</code></td><td>Non</td><td>Suggestion pour la fête des Mères</td><td>Nom de la page.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>type</code><br>(obsolète)</td><td><code>string</code></td><td>Non</td><td>product_list</td><td>Catégorie de page</td></tr></tbody></table>

**Paramètres ajoutés automatiquement par l’API cact pour les sources web**

<table><thead><tr><th width="133">Nom</th><th width="103">Type</th><th width="81">Obligatoire</th><th width="161">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>user</code></td><td><a href="#user">Objet &#x3C;User></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Non</td><td>Produits - MySite.com</td><td>Titre de la page :<a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/title"><code>document.title</code></a> depuis l’API DOM</td></tr><tr><td><code>url</code></td><td><code>string</code></td><td>Non</td><td><a href="http://www.mysite.com">http://www.mysite.com</a></td><td>URL complète de la page. Équivalent de<a href="https://developer.mozilla.org/en-US/docs/Web/API/Location"><code>location.href</code></a> depuis l’API DOM.</td></tr><tr><td><code>path</code></td><td><code>string</code></td><td>Non</td><td>/products/mothers</td><td>Partie chemin de l’URL de la page : <a href="https://developer.mozilla.org/en-US/docs/Web/API/Location"><code>location.pathname</code></a> depuis l’API DOM.</td></tr><tr><td><code>referrer</code></td><td><code>string</code></td><td>Non</td><td><a href="http://www.example.com">http://www.example.com</a></td><td>URL complète de la page précédente : <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer"><code>document.referrer</code></a> depuis l’API DOM.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="Javascript" %}

```javascript
cact('trigger','page_view', {
  page_type: 'product_list',
  page_name: 'Best sellers',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCPageViewEvent("product_list")
event.pageName = "Best sellers"
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
TCPageViewEvent event = new TCPageViewEvent("product_list")
event.pageName = "Best sellers";
serverside.execute(event);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCPageViewEvent *event = [[TCPageViewEvent alloc] init];
event.pageType = @"product_list";
event.pageName = @"Best sellers";
[TCS execute: event];

//ou vous pouvez aussi l’utiliser dans un constructeur, comme suit :
TCPageViewEvent *event = [[TCPageViewEvent alloc] initWithType: @"type"];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
let event = TCPageViewEvent(type: "product list")
	event?.pageName = "Best sellers"
	serverside?.execute(event)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCPageViewEvent();
    event.pageName = "event_page_name";
    event.pageType = "event_page_type";
    serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "page_view", 
        "page_type": "product_list",
        "page_name": "Best sellers"   
}
```

{% endtab %} {% endtabs %}

## purchase

Déclenchez cet événement lorsqu’un ou plusieurs articles sont achetés par un utilisateur.

#### Paramètres **(obligatoire et recommandé)** <a href="#parameters_17" id="parameters_17"></a>

<table><thead><tr><th width="182">Nom</th><th width="113">Type</th><th>Obligatoire</th><th>Exemple</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>O_1245</td><td>ID de transaction. Utilisé comme clé pour les mises à jour</td></tr><tr><td><code>event_name</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>purchase</td><td>Doit être purchase</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>offline</td><td>Type de conversion (online, offline, appel, etc.)</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>22.53</td><td>Prix final de la conversion (frais de livraison et taxes <strong>inclus</strong>) après remise</td></tr><tr><td><code>revenue</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>16.00</td><td>Prix final de la conversion (frais de livraison et taxes <strong>exclus</strong>) après remise</td></tr><tr><td><code>payment_method</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>card</td><td>Type de mode de paiement (voir la liste des <a href="#payment-methods">valeurs possibles</a> ci-dessous)</td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td><strong>Oui</strong></td><td>EUR</td><td>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</td></tr><tr><td><code>status</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>in_progress</td><td>Statut de la conversion (voir la liste des <a href="#purchase-status">valeurs possibles</a> ci-dessous).<br><em>Les conversions avec le statut « pending » ne sont pas incluses dans les sommes et les décomptes par défaut agrégés dans la fonctionnalité d’attributs utilisateur enrichis.</em></td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td><strong>Oui</strong></td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3],</code></p><p><code>card:3320457845</code></p><p><code>}</code></p></td><td><p>Toutes les propriétés que vous ajoutez ici seront utilisées comme critères pour faire correspondre les utilisateurs de notre base de données.</p><p><code>consent_categories</code> est renseigné automatiquement si vous utilisez la CMP Commanders Act.</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr><tr><td><code>coupon</code></td><td><code>string</code></td><td>Non</td><td>CHRISTMAS</td><td>Code promo utilisé pour un achat.</td></tr><tr><td><code>tax_amount</code></td><td><code>number</code></td><td>Non</td><td>3.20</td><td>Montant des taxes à la fin de la conversion</td></tr><tr><td><code>shipping_amount</code></td><td><code>number</code></td><td>Non</td><td>3.33</td><td>Frais de livraison associés à une transaction.</td></tr><tr><td><code>shipping_provider</code></td><td><code>string</code></td><td>Non</td><td>Poste</td><td>Informations sur le prestataire</td></tr><tr><td><code>discount_value</code></td><td><code>number</code></td><td>Non</td><td>3.98</td><td>Montant de la remise (taxes <strong>incluses</strong>)</td></tr><tr><td><code>original_value</code></td><td><code>number</code></td><td>Non</td><td>19.98</td><td>Prix initial de la conversion d’origine (taxes <strong>incluses</strong>)</td></tr><tr><td><code>original_revenue</code></td><td><code>number</code></td><td>Non</td><td>16.78</td><td>Chiffre d’affaires initial de la conversion d’origine (taxes <strong>exclues</strong>)</td></tr><tr><td><code>original_tax_amount</code></td><td><code>number</code></td><td>Non</td><td>3.20</td><td>Montant des taxes au début de la conversion</td></tr><tr><td><code>returned_value</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Montant des articles retournés (taxes <strong>incluses</strong>)</td></tr><tr><td><code>returned_quantity</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Quantité d’articles retournés (taxes <strong>incluses</strong>)</td></tr><tr><td><code>cancelled_value</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Montant des articles annulés (taxes <strong>incluses</strong>)</td></tr><tr><td><code>cancelled_quantity</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Quantité d’articles annulés (taxes <strong>incluses</strong>)</td></tr><tr><td><code>store_identifier</code></td><td><code>string</code></td><td>Non</td><td>store_1</td><td>Identifiant du magasin de l’achat</td></tr></tbody></table>

**Ajouté automatiquement par l’API cact**

| Nom   | Type        | Obligatoire | Exemple | Description                                                                                       |
| ----- | ----------- | ----------- | ------- | ------------------------------------------------------------------------------------------------- |
| `url` | string(url) | Non         | none    | <p>URL du site web où vous pouvez acheter l’article</p><p>Équivalent de window\.location.href</p> |

**Exemple**

{% tabs %} {% tab title="json" %}

```json
{
   "id": "O_12345",
   "event_name": "purchase",
   "type": "offline",
   "value": 0,
   "revenue": 16.00,
   "payment_method": "card",
   "currency": "EUR",
   "status": "in_progress",
   "user": {
      "id": "12345",
      "email": "toto@domain.fr",
      "consent_categories": [
         1,
         3
      ],
      "card": "3320457845"
   },
   "context": {
      "event_id": "2025uaoauud",
      "event_timestamp": "2025-04-18T07:53:39.974+02:00"
   },
   "items": [
      {
         "id": "SKU_12345",
         "quantity": 1,
         "price": 9.99,
         "variant": "red",
         "discount": 1.99,
         "value": 8.0,
         "cancelled_value": 0,
         "cancelled_quantity": 0,
         "original_value": 9.99,
         "returned_value": 0,
         "returned_quantity": 0,
         "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,
         "value": 8.0,
         "cancelled_value": 0,
         "cancelled_quantity": 0,
         "original_value": 9.99,
         "returned_value": 0,
         "returned_quantity": 0,
         "product": {
            "id": "12346",
            "name": "Heart tshirt",
            "category_1": "clothes",
            "category_2": "t-shirts",
            "category_3": "girl",
            "brand": "Jenyfuen",
            "colors": [
               "blue",
               "white"
            ],
            "price": 9.99
         }
      }
   ],
   "coupon": "CHRISTMAS",
   "tax_amount": 3.20,
   "shipping_amount": 3.33,
   "shipping_provider": "Post",
   "discount_value": 3.98,
   "original_value": 19.98,
   "original_revenue": 16.78,
   "original_tax_amount": 3.20,
   "returned_value": 0,
   "returned_quantity": 0,
   "cancelled_value": 0,
   "cancelled_quantity": 0
}
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
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
    }
  }]
})
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %} {% endtabs %}

## remboursement

Déclenchez cet événement lorsqu’un achat a été remboursé.

#### Paramètres **(obligatoire et recommandé)** <a href="#parameters_17" id="parameters_17"></a>

<table><thead><tr><th width="182">Nom</th><th width="99">Type</th><th width="76">Obligatoire</th><th width="154">Exemple</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>O_1245</td><td>ID de transaction. Utilisé comme clé pour les mises à jour</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p>Toutes les propriétés que vous ajoutez ici seront utilisées comme critères pour faire correspondre les utilisateurs de notre base de données.</p><p><code>consent_categories</code> est renseigné automatiquement si vous utilisez la CMP Commanders Act.</p></td></tr><tr><td><code>revenue</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>16.00</td><td>La valeur monétaire de l’événement (prix de livraison et taxes <strong>exclus</strong>) après réduction</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>22.53</td><td>Valeur monétaire de l’événement (prix de livraison et taxes <strong>compris</strong>) après remise</td></tr><tr><td><code>shipping_amount</code></td><td><code>number</code></td><td>Non</td><td>3.33</td><td>Frais de livraison associés à une transaction.</td></tr><tr><td><code>tax_amount</code></td><td><code>number</code></td><td>Non</td><td>3.20</td><td>Frais de livraison associés à une transaction.</td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td><strong>Oui</strong></td><td>EUR</td><td>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</td></tr><tr><td><code>coupon</code></td><td><code>string</code></td><td>Non</td><td>CHRISTMAS</td><td>Code promo utilisé pour un achat.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>offline</td><td>Type de conversion (online, offline, appel, etc.)</td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td>Non*</td><td></td><td>(*) <code>items</code> est obligatoire pour les remboursements partiels, mais peut être omis pour les remboursements complets.</td></tr></tbody></table>

**Ajouté automatiquement par l’API cact**

<table><thead><tr><th width="128">Nom</th><th width="115">Type</th><th width="103">Obligatoire</th><th>Exemple</th><th>Description</th></tr></thead><tbody><tr><td><code>url</code></td><td>string(url)</td><td>Non</td><td>none</td><td><p>URL du site web où vous pouvez acheter l’article</p><p>Équivalent de window.location.href</p></td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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]
  }
})
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "refund",
        "value": 8.00,
        "currency": "EUR",
        "revenue": 16.00,
        "shipping_amount": 3.33,
        "tax_amount": 3.20
}
```

{% endtab %} {% endtabs %}

## remove\_from\_cart

Cet événement indique qu’un article a été retiré du panier.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="146">Nom</th><th width="103">Type</th><th width="106">Obligatoire</th><th>Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>value</code></td><td><code>number</code></td><td>Non</td><td>8.00</td><td><p>La valeur monétaire de l’événement.<br>(<em>)<code>value</code> est généralement requise pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est requise si vous définissez <code>value</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td>Non</td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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"
                    ]
                }
            }
        ]
}
```

{% endtab %} {% endtabs %}

## search

Utilisez cet événement pour contextualiser les opérations de recherche. Il peut vous aider à identifier les contenus les plus populaires dans votre application.

#### Paramètres <a href="#parameters_21" id="parameters_21"></a>

<table><thead><tr><th width="169">Nom</th><th width="102">Type</th><th width="82">Obligatoire</th><th width="155">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>search_term</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>t-shirts</td><td>Le terme recherché.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
cact('trigger','search', {
  search_term: 't-shirts',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCSearchEvent("t-shirts")
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```
// Some code
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCSearchEvent *event = [[TCSearchEvent alloc] init];
event.searchTerm = @"t-shirts";
[TCS execute: event];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

<pre class="language-swift"><code class="lang-swift">let event = TCSearchEvent(searchTerm: "t-shirts")
<strong>    serverside.execute(event)
</strong></code></pre>

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCSearchEvent();
    event.searchTerm = "t-shirts";
    serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "search",
        "search_term": "t-shirts"
}
```

{% endtab %} {% endtabs %}

## select\_content

Cet événement indique qu’un utilisateur a sélectionné un contenu d’un type donné. Il peut vous aider à identifier les contenus populaires et les catégories de contenus dans votre application, ou les clics sur une promotion interne.

#### Paramètres <a href="#parameters_22" id="parameters_22"></a>

<table><thead><tr><th width="175">Nom</th><th width="100">Type</th><th width="76">Obligatoire</th><th width="159">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>content_type</code></td><td><code>string</code></td><td>Non</td><td>product</td><td>Le type de contenu sélectionné.</td></tr><tr><td><code>item_id</code></td><td><code>string</code></td><td>Non</td><td>I_12345</td><td>Un identifiant de l’article sélectionné.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
cact('trigger','select_content', {
  content_type: 'product',
  item_id: 'I_12345',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCSelectContentEvent
event.contentType = "product"
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
TCSelectContentEvent event = new TCSelectContentEvent();
event.contentType = "product";
serverside.execute(event);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCSelectContentEvent *event = [[TCSelectContentEvent alloc] init];
event.contentType = @"product";
event.itemID = @"I_12345";
[TCS execute: event];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
let event = TCSelectContentEvent()
	event.contentType = "product"
	event.itemID = "I_12345"
	serverside?.execute(event)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCSelectContentEvent();
    event.contentType = "product";
    event.itemId = "I_12345";
    serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "select_content",
        "content_type": "product",
        "item_id": "I_12345"
}
```

{% endtab %} {% endtabs %}

## select\_item

Cet événement indique qu’un élément a été sélectionné dans une liste.

#### Paramètres <a href="#parameters_23" id="parameters_23"></a>

<table><thead><tr><th width="192">Nom</th><th width="105">Type</th><th width="71">Obligatoire</th><th width="124">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>item_list_name</code></td><td><code>string</code></td><td>Non</td><td>Produits associés</td><td>Le nom de la liste dans laquelle l’élément a été présenté à l’utilisateur.</td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les éléments de l’événement. Le <code>items</code> tableau doit contenir un seul élément, représentant l’élément sélectionné.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

<pre class="language-kotlin"><code class="lang-kotlin">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&#x3C;TCItem>(item1, item2)

val event = TCSelectItemEvent(items);
<strong>    event.itemListName = "Related products"
</strong>serverside.execute(event);
</code></pre>

{% endtab %}

{% tab title="Java (Android)" %}

```java
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));

TCSelectItemEvent event = new TCSelectItemEvent(items);
event.itemListName = "Related products";
serverside.execute(event);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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"
                    ]
                }
            }
        ]
}
```

{% endtab %} {% endtabs %}

## sign\_up <a href="#sign_up" id="sign_up"></a>

Cet événement indique qu’un utilisateur a créé un compte.

#### Paramètres **(obligatoire et recommandé)** <a href="#parameters_27" id="parameters_27"></a>

<table><thead><tr><th width="117">Nom</th><th width="102">Type</th><th width="104">Obligatoire</th><th width="160">Exemple</th><th>Description</th></tr></thead><tbody><tr><td><code>method</code></td><td><code>string</code></td><td>Non</td><td>Facebook</td><td>La méthode utilisée pour l’inscription.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
cact('trigger','sign_up', {
  method: 'email',
  user: {
    id: '12356',
    email:'toto@domain.fr',
    consent_categories: [1,3]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
val event = TCSignUpEvent()
event.method = "email"
serverside.execute(event)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
TCSignUpEvent event = new TCSignUpEvent();
event.method = "email";
serverside.execute(event);

```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
TCSignUpEvent *event = [[TCSignUpEvent alloc] init];
event.method = @"email";
[TCS execute: event];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
let event = TCSignUpEvent()
	event.method = "email"
	serverside?.execute(event)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
var event = TCSignUpEvent();
    event.method = "email";
    serverside.execute(event);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "event_name": "sign_up",
        "method": "email"
}
```

{% endtab %} {% endtabs %}

## view\_cart

Cet événement indique qu’un utilisateur a consulté son panier.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="147">Nom</th><th width="102">Type</th><th width="76">Obligatoire</th><th width="163">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>value</code></td><td><code>number</code></td><td>Non</td><td>8.00</td><td><p>La valeur monétaire de l’événement.<br>(<em>)<code>value</code> est généralement requise pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est requise si vous définissez <code>value</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td>Non</td><td>EUR</td><td><p>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</p><p>(*) Si vous fournissez le <code>revenue</code> paramètre, vous devez également fournir le <code>currency</code> paramètre afin que les indicateurs de revenus puissent être calculés avec précision.</p></td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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"
                    ]
                }
            }
        ]
}
```

{% endtab %} {% endtabs %}

## view\_item

Cet événement indique qu’un contenu a été présenté à l’utilisateur. Utilisez cet événement pour gérer les articles les plus consultés.

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="139">Nom</th><th width="101">Type</th><th width="82">Obligatoire</th><th width="157">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>value</code></td><td><code>number</code></td><td><strong>Oui</strong>*</td><td>9.99</td><td><p>La valeur monétaire de l’événement.<br>(<em>)<code>value</code> est généralement requise pour obtenir des rapports pertinents.</em></p><p><em>(</em>)<code>currency</code> est requise si vous définissez <code>value</code>.</p></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td><strong>Oui*</strong></td><td>EUR</td><td>Devise de l’achat ou des articles associés à l’événement, au format ISO 4217 à 3 lettres.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="JavaScript" %}

```javascript
cact('trigger','view_item', {
  value: 9.99,
  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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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"
                    ]
                }
            }
        ]
}
```

{% endtab %} {% endtabs %}

## view\_item\_list

Consignez cet événement lorsque l’utilisateur a vu une liste d’articles d’une catégorie donnée.

#### Paramètres <a href="#parameters_35" id="parameters_35"></a>

<table><thead><tr><th width="195">Nom</th><th width="100">Type</th><th width="78">Obligatoire</th><th width="163">Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>item_list_name</code></td><td><code>string</code></td><td>Non</td><td>Produits associés</td><td>Le nom de la liste dans laquelle l’élément a été présenté à l’utilisateur.</td></tr><tr><td><code>user</code></td><td><a href="#user"><code>Object&#x3C;User></code></a></td><td>Oui</td><td><p><code>{</code><br><code>id: '12345',</code><br><code>email: 'toto@domain.fr',</code></p><p><code>consent_categories: [1,3]</code></p><p><code>}</code></p></td><td><p><code>consent_categories</code> correspond à la liste des consentements de l’utilisateur. Elle est automatiquement renseignée à partir des sources web si vous utilisez la CMP Commanders Act.</p><p>Vous devez également ajouter toutes les propriétés de l'utilisateur dans cet objet, notamment les clés de rapprochement (ID, e-mail).</p></td></tr><tr><td><code>items</code></td><td><a href="#item"><code>Array&#x3C;Item></code></a></td><td><strong>Oui</strong></td><td></td><td>Les articles associés à l’événement.</td></tr></tbody></table>

**Exemple**

{% tabs %} {% tab title="Javascript" %}

```kotlin
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]
  }
});
```

{% endtab %}

{% tab title="Kotlin (Android)" %}

```kotlin
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)
```

{% endtab %}

{% tab title="Java (Android)" %}

```java
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);
```

{% endtab %}

{% tab title="Objective-C (iOS)" %}

```objectivec
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];
```

{% endtab %}

{% tab title="Swift (iOS)" %}

```swift
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)
```

{% endtab %}

{% tab title="Dart (Flutter)" %}

```dart
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);
```

{% endtab %}

{% tab title="json" %}

```json
{
    "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
            ]
        }
}
```

{% endtab %} {% endtabs %}

## - SCHÉMAS COMMUNS -

### Article

#### Paramètres **(obligatoire et recommandé)** <a href="#parameters_27" id="parameters_27"></a>

<table><thead><tr><th width="179">Nom</th><th>Type</th><th width="64">Obligatoire</th><th width="129">Exemple</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>SKU_12345</td><td><p>L’ID d’un article.</p><p>Si vous n’avez pas d’ID d’article, vous pouvez utiliser l’ID du produit comme valeur. Ce champ sert de clé pour les mises à jour (ex. : remboursement).</p></td></tr><tr><td><code>product</code></td><td><a href="#product"><code>Object&#x3C;Product></code></a></td><td><strong>Oui</strong></td><td></td><td>Les détails du produit</td></tr><tr><td><code>variant</code></td><td><code>string</code></td><td>Non</td><td>rouge</td><td>La variante de l’article.</td></tr><tr><td><code>list_position</code></td><td><code>number</code></td><td>Non</td><td>1</td><td>La position de l’article dans une liste ou une collection.</td></tr><tr><td><code>discount</code></td><td><code>number</code></td><td>Non</td><td>2.00</td><td>Valeur monétaire de la remise pour un article donné</td></tr><tr><td><code>quantity</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>2</td><td>La quantité de l’article.</td></tr><tr><td><code>affiliation</code></td><td><code>string</code></td><td><strong>Non</strong>*</td><td>TÉLÉCHARGER</td><td>Obligatoire pour la plupart des destinations d’affiliation.</td></tr><tr><td><code>coupon</code></td><td><code>string</code></td><td>Non</td><td>CHRISTMAS</td><td>Le code promo associé à un article.</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Le prix final des articles (taxes <strong>comprises</strong>). Il correspond au prix unitaire TTC multiplié par la quantité d’articles</td></tr><tr><td><code>cancelled_value</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Montant des<br>articles annulés<br>(taxes <strong>comprises</strong>)</td></tr><tr><td><code>cancelled_quantity</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Quantité d’articles annulés (taxes <strong>incluses</strong>)</td></tr><tr><td><code>original_value</code></td><td><code>number</code></td><td>Non</td><td>10.00</td><td>Prix d’origine de l’article (taxes <strong>comprises</strong>)</td></tr><tr><td><code>returned_value</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Prix de l’article retourné (taxes <strong>comprises</strong>)</td></tr><tr><td><code>returned_quantity</code></td><td><code>number</code></td><td>Non</td><td>0</td><td>Quantité d’articles retournés</td></tr></tbody></table>

### Produit

**Paramètres (obligatoires et recommandés)**

<table><thead><tr><th width="133">Nom</th><th>Type</th><th width="76">Obligatoire</th><th>Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td><strong>Oui</strong>*</td><td>12345</td><td><p>L’ID du produit (par exemple, dans la base de données de votre catalogue de produits)<br>L’ <code>item.id</code> et <code>product.id</code> ne sont pas nécessairement différents. S’ils le sont, généralement, le <code>product.id</code> est un identifiant de base de données, comme <code>9714107479</code> et le <code>item.id</code> est un identifiant public, comme <code>SKU-12345</code>.</p><p>(*) Si vous avez importé le catalogue de produits sur la plateforme, le <code>product.id</code> correspond à l’ID unique du produit dans le catalogue et peut être utilisé avec la fonctionnalité d’expansion d’ID.</p></td></tr><tr><td><code>name</code></td><td><code>string</code></td><td><strong>Oui</strong></td><td>Trex</td><td>Nom du produit</td></tr><tr><td><code>price</code></td><td><code>number</code></td><td><strong>Oui</strong></td><td>14.99</td><td>Le prix du produit (remise et taxes <strong>exclues)</strong></td></tr><tr><td><code>currency</code></td><td><code>string (ISO 4217)</code></td><td>Non</td><td>EUR</td><td><p>Devise du <code>price</code>, au format ISO 4217 à 3 lettres.</p><p>Si elle est définie, la <code>currency</code> au niveau de l’événement est ignorée.<br><br>L’utilisation de plusieurs devises par événement n’est pas prise en charge. Chaque article doit utiliser la même devise.</p></td></tr><tr><td><code>category_1</code></td><td><code>string</code></td><td>Non</td><td>T-Shirts</td><td>Catégorie de produit (spécifique au contexte). <code>item_category2</code> à <code>item_category5</code> peuvent également être utilisés si le produit comporte plusieurs catégories.</td></tr><tr><td><code>brand</code></td><td><code>string</code></td><td>Non</td><td>Lacoste</td><td>Marque du produit</td></tr><tr><td><code>colors</code></td><td><code>Array[string]</code></td><td>Non</td><td>[blue, white]</td><td>La ou les couleurs du produit</td></tr><tr><td><code>size</code></td><td><code>string</code></td><td>Non</td><td>128</td><td>Taille de l’article</td></tr></tbody></table>

### Utilisateur

Lorsque vous envoyez un événement, il doit contenir suffisamment d’informations pour identifier l’utilisateur qui l’a généré. Nous pouvons relier les événements entre eux à l’aide de cookies. Toutefois, les partenaires de destination ont besoin d’identifiants précis pour agir.

`id` et `email` sont généralement les paramètres les plus utiles. Certains partenaires de destination utilisent également `firstname`, `lastname`, `birthdate`, `city`, ...

Vous ne disposerez pas toujours de tous ces paramètres. Il est toutefois recommandé de les envoyer dès que possible pendant la navigation de l’utilisateur.

#### Paramètres **(obligatoire et recommandé)** <a href="#parameters_17" id="parameters_17"></a>

<table><thead><tr><th width="173">Nom</th><th width="121">Type</th><th width="91">Obligatoire</th><th>Exemple de valeur</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td>Non*</td><td>845454</td><td><p>Identifiant principal de l’utilisateur (par ex. ID CRM)</p><p>(*) obligatoire pour de nombreuses destinations et pour le traitement interne.</p></td></tr><tr><td><code>email</code></td><td><code>string</code></td><td>Oui*</td><td>john.doe@example.com</td><td><p>E-mail (valeur en clair)</p><p>(*) obligatoire pour de nombreuses destinations et pour le traitement interne. Non obligatoire si <code>email_sha256</code> est fourni</p></td></tr><tr><td><code>email_md5</code></td><td><code>string</code></td><td>Non*</td><td>8eb1b52... (taille 32)</td><td>E-mail haché avec l’algorithme <a href="https://en.wikipedia.org/wiki/MD5">MD5</a>. Non obligatoire si <code>email</code> est fourni (voir ci-dessous)</td></tr><tr><td><code>email_sha256</code></td><td><code>string</code></td><td>Non*</td><td>836f82d... (taille 64)</td><td>E-mail haché avec l’algorithme <a href="https://en.wikipedia.org/wiki/SHA-2">SHA-256</a>. Non obligatoire si <code>email</code> est fourni (voir ci-dessous)</td></tr><tr><td><code>phone</code></td><td><code>string</code></td><td>Non*</td><td>+33612345678</td><td>Numéro de téléphone au format <a href="https://en.wikipedia.org/wiki/E.164">E.164</a> <br>(*) obligatoire pour certaines destinations.</td></tr><tr><td><code>firstname</code></td><td><code>string</code></td><td>Non</td><td>John</td><td>Prénom</td></tr><tr><td><code>lastname</code></td><td><code>string</code></td><td>Non</td><td>Doe</td><td>Nom</td></tr><tr><td><code>gender</code></td><td><code>string</code></td><td>Non</td><td>m</td><td><p>Genre</p><ul><li><code>f</code> pour les femmes</li><li><code>m</code> pour les hommes</li></ul></td></tr><tr><td><code>birthdate</code></td><td><code>string</code></td><td>Non</td><td>1970-01-01</td><td>Date de naissance, <code>YYYY-MM-DD</code> format</td></tr><tr><td><code>city</code></td><td><code>string</code></td><td>Non</td><td>Boston</td><td>Ville</td></tr><tr><td><code>state</code></td><td><code>string</code></td><td>Non</td><td>Massachusetts</td><td>État</td></tr><tr><td><code>street</code></td><td><code>string</code></td><td>Non</td><td>303 Sumner St</td><td>Adresse</td></tr><tr><td><code>zipcode</code></td><td><code>string</code></td><td>Non</td><td>02108</td><td>Code postal</td></tr><tr><td><code>country</code></td><td><code>string</code></td><td>Non</td><td>USA</td><td>Code pays, ISO 3166-1 <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">à 2 lettres</a> ou <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3">à 3 lettres</a> formats</td></tr><tr><td><code>consent_categories</code></td><td><code>Array</code></td><td><strong>Oui</strong></td><td>[1,3,4]</td><td>Catégories de consentement de l'utilisateur. Elles ne doivent contenir que les catégories pour lesquelles l'utilisateur a donné son consentement.<br>Nécessaire pour autoriser le partage de données avec les partenaires de destination. Ces catégories sont automatiquement renseignées à partir des sources web si vous utilisez la CMP de Commanders Act.</td></tr><tr><td>status</td><td><code>string</code></td><td>Non</td><td>Nouveau</td><td>Statut tel qu'indiqué dans votre CRM (par ex. « Nouveau », « Existant », « Premium »)</td></tr></tbody></table>

**À propos du hachage**

Dans certains cas, vous ne pourrez pas envoyer un paramètre **en clair** . Il peut être indisponible ou soumis à des restrictions.

Il peut donc être possible d'envoyer les valeurs **hachées** . Nous acceptons actuellement 2 algorithmes : [`md5`](https://en.wikipedia.org/wiki/MD5) et [`sha256`](https://en.wikipedia.org/wiki/SHA-2).

Chaque `user.<property>` peut être envoyé au format haché avec le suffixe de l'algorithme : `_md5` ou `_sha256` *(trait de soulignement suivi du nom de l’algorithme en minuscules)*

Exemple :

```
{
  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')
  }
}
```

> :information\_source: nous prenons uniquement en charge l’encodage hexadécimal (base 16)\
> \&#xNAN;*(c.-à-d. : **hachées** les valeurs sont représentées par des chaînes contenant les caractères \[0-9a-f])*\
> Les autres encodages ne sont pas encore pris en charge

Il n’est pas nécessaire d’envoyer les deux valeurs **en clair** et **hachées**  :

* si vous envoyez une valeur **en clair** la valeur **hachée** n’est pas nécessaire\
  \&#xNAN;*Nous pouvons générer les valeurs **hachée** côté serveur à partir de la valeur **en clair** en clair*
* si vous n’envoyez pas de valeur **en clair** vous devez alors renseigner autant de valeurs **hachées** que possible\
  \&#xNAN;*Les partenaires exigent différents algorithmes de hachage et, sans valeur **en clair** en clair, nous ne pouvons générer aucun hachage. C’est pourquoi nous avons besoin de la valeur exacte **hachées** en clair*

## - VALEUR ÉNUMÉRÉE -

### Modes de paiement

Valeurs énumérées pour les modes de paiement :

| Propriété       | Valeur                          |
| --------------- | ------------------------------- |
| 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                           |

### Statut de l’achat

Valeurs énumérées pour le statut de l’achat :

<table><thead><tr><th width="380">Propriété</th><th>Valeur</th></tr></thead><tbody><tr><td>status</td><td>canceled</td></tr><tr><td>status</td><td>livré</td></tr><tr><td>status</td><td>in_progress</td></tr><tr><td>status</td><td>partiellement_livré</td></tr><tr><td>status</td><td>partiellement_retourné</td></tr><tr><td>status</td><td>partiellement_expédié</td></tr><tr><td>status</td><td>en_attente_d’expédition</td></tr><tr><td>status</td><td>retourné</td></tr><tr><td>status</td><td>expédié</td></tr><tr><td>status</td><td>en_attente</td></tr></tbody></table>

##

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/events-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
