Retail/Ecommerce Apps
View Item
When the user needs to be taken to the detail/view page of product content. The app should handle the edge cases. For example-
- Invalid product/item id.
- If the user is not allowed to go to the item’s detail page (maybe because the user is not logged in)
Properties
Key | Value | Description |
actionType | VIEW_ITEM | Type of action to be performed. |
item | Item | The object of the item which holds itemID, Name. It is similar to an item sent via View Item event or via CMS. |
Code Example
View Category
When the user needs to be taken to a category page which lists all the items of that category. You should take care of the edge cases. For example-
- Invalid category id.
- If the user is not allowed to go to the screen (maybe because the user is not logged in).
Properties
Key | Value | Description |
actionType | VIEW_CATEGORY | Type of action to be performed. |
category | Category | the object of the item which holds categoryID, Name. It is similar to an item sent via View Category event or via CMS. |
Code Example
Add to Cart
When the user needs to be taken to the detail/view page of product content. The app should handle the edge cases. For example-
- Invalid product/item id.
- If the user is not allowed to go to the item’s detail page (maybe because the user is not logged in)
Properties
Key | Value | Description |
actionType | ADD_TO_CART | Type of action to be performed. |
item | Item | The object of the item which holds itemID, Name. It is similar to an item sent via View Item event or via CMS. |
quantity | Number | Quantity of the item to be added to the cart. |
Code Example
Apply Coupon
When some coupon code needs to be applied to the cart of the user. The app should take care of the different scenarios. For example-
- Check the validity of the coupon.
- Handle the scenario where there are no items in the cart.
- Handle the scenario when the user is not logged-in.
Properties
Key | Value | Description |
actionType | APPLY_COUPON | Type of action to be performed. |
coupon | Coupon | Object of Coupon which contain couponID, Code. |
Code Example
Search
Open the search view and apply the given filters.
Properties
Key | Value | Description |
actionType | SEARCH | Type of action to be performed. |
query | String | Content be be searched. |
categories | Array of Category | List of category to be searched. |
tags | Array of Tag | List of tags to be searched. |
Code Example