App Scripts
Global and Customer Object Scripting
1.
2.
Global Object Parameters:
Parameter | Description |
---|---|
window.customer | Contains details of the logged-in customer. Empty if no user is logged in. |
Customer Object Blueprint:
Parameter | Description |
---|---|
id | Unique identifier for the customer |
name | Full name of the customer |
mobile | Mobile number of the customer |
email | Email address of the customer |
Event-Driven Scripting
1.
2.
3.
4.
5.
productCart
refers to the product in the cart, and productViewd
refers to the viewed product. The unconventional spelling is consistent with the codebase.)1. Purchase Event
Parameter | Description |
---|---|
transactionItems | List of products the user purchased. |
id | Order Id |
product id | Product Id |
name | Product Name |
sku | Product Sku code |
category | Product Category Name |
price | Product Price |
quantity | Product Quantity |
currency | currency |
total | Product Total |
2. Product View Event
Parameter | Description |
---|---|
productViewd | Single product details object. |
id | Product Id |
name | Product Name |
category | Product Category Name |
price | Product Price |
position | Display Order |
3. Add to Cart Event
Parameter | Description |
---|---|
productCart | Single product cart object. |
id | Product Id |
name | Product Name |
category | Product Category Name |
price | Product Price |
position | Display Order |
list | Name of page |
quantity | Product Quantity |
4. Remove from Cart Event
Parameter | Description |
---|---|
productCart | Single product cart object. |
id | Product Id |
name | Product Name |
category | Product Category Name |
price | Product Price |
position | Display Order |
list | Name of page |
quantity | Product Quantity |
5. Start Checkout Event Parameters
Parameter | Description |
---|---|
cart_id | Unique identifier for the shopping cart. |
cart_total | Total value of the cart. |
currency | Currency used for the transaction. |
items | List of items in the cart, each represented by its own object. |
item_id | Unique identifier for each product in the cart. |
item_name | Name of the product. |
item_price | Price of the product. |
item_quantity | Quantity of the product in the cart. |
item_category | Category of the product. |
user_id | Unique identifier of the user (if logged in). |
session_id | Unique identifier for the session (if user is not logged in). |
cart_discount | Any discount applied to the cart. |
shipping_cost | Estimated shipping cost for the cart. |
checkout_step | Current step in the checkout process (e.g., shipping, payment, confirmation). |
payment_method | Selected payment method (if chosen). |
Script Injection for App Partners
How to Enable Custom Snippets
1.
2.
3.
4.
Modified at 2025-03-12 20:59:28