Application
Reports that a user started the application process for a product.
Required for financial institution sections.
Parameters
- name: Human-readable name, not used to identify an event type
- properties: A container for the event properties as specified in the following table:
Property | Description | Type |
---|---|---|
dyType | Must be "add-to-cart-v1". | String |
value | The total monetary value of the event (item or items added that triggered the event only) | Float (dollars.cents). Numbers are rounded to the nearest 0.01. Numbers smaller than 0.005 are rounded down to 0. |
currency Optional, but required for multi-currency sites | The currency used for the value | String List of supported currencies |
productId | The SKU exactly as it appears in the product feed | String |
quantity | The total number of items that were added to cart | Number |
cart Optional, but recommended | The cart's current state, including the last item added. Products are ordered from the first added to the cart to the most recent. Note: Pass the updated cart with the newly added product to ensure that the cart state is fully in sync with your system. This is important mainly for triggered email and push notifications. | Object See the cart property table that follows for details. |
Cart object properties:
Property | Description | Type |
---|---|---|
productId | SKU exactly as it appears in the product feed | String |
quantity | Number of items | Number |
itemPrice | The price of the item added | Float in the format: dollars.cents |
Example: Implementation via script
DY.API("event", {
name: "Application Started",
properties: {
dyType: "add-to-cart-v1",
value: 400.00,
currency: "EUR",
productId: "item-34454",
quantity: 2,
cart: [{
productId: "sku-4324-bg",
quantity: 2,
itemPrice: 100,
},
{
productId: "item-34454",
quantity: 2,
itemPrice: 200
}
]
}
});
Example: Implementation via Experience API (server-side)
"events":[
{
name: "Application Started",
properties: {
dyType: "add-to-cart-v1",
value: 1,
productId: "p-tv78615a",
quantity: 1,
cart: [
{
productId: "p-tv78615a",
quantity: 1,
itemPrice: 1
}
]
}
}
]
Go to the API reference for the Events endpoint to learn more.
Updated 9 months ago