website logo
HomeGo to Dashboard
User Guide
How-To Videos
Developers
Navigate through spaces
⌘K
Getting Started
Introduction
Compatibility
Terminology
SDK Installation
Shopify
Any Website
Dukaan
Angular 2+
WooCommerce
WordPress
Android Native
iOS Native
Flutter
Cordova
Ionic
React Native
Data Integration
Data Models
Mandatory Events
Mandatory Properties
Call to Action
System Events
Device Properties
Docs powered by archbee 

Retail/Ecommerce Apps

20min

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-

  1. Invalid product/item id.
  2. 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

JS
TS
Java
Kotlin
ObjectiveC
Swift
Dart
|
function onCooeeCTAListener(payload) {
    if (!payload) {
        return;
    }

    if (payload.get("actionType") == "VIEW_ITEM") {
        const item =  payload.get("item");
        // Show given item to the user
    }
}


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-

  1. Invalid category id.
  2. 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

JS
TS
Java
Kotlin
ObjectiveC
Swift
Dart
|
function onCooeeCTAListener(payload) {
    if (!payload) {
        return;
    }

    if (payload.get("actionType") == "VIEW_CATEGORY") {
        const category =  payload.get("category");
        // Show given item to the user
    }
}


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-

  1. Invalid product/item id.
  2. 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

JS
TS
Java
Kotlin
ObjectiveC
Swift
Dart
|
function onCooeeCTAListener(payload) {
    if (!payload) {
        return;
    }

    if (payload.get("actionType") == "ADD_TO_CART") {
        const item =  payload.get("item");
        var quanity = payload.get("quantity");
        if(!quanity || quanity == 0){
            quanity = 1;
        }
        // Add item to the cart with given quantity
    }
}


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-

  1. Check the validity of the coupon.
  2. Handle the scenario where there are no items in the cart.
  3. 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

JS
TS
Java
Kotlin
ObjectiveC
Swift
Dart
|
function onCooeeCTAListener(payload) {
    if (!payload) {
        return;
    }

    if (payload.get("actionType") == "APPLY_COUPON") {
        const coupon =  payload.get("coupon");
        // Apply Coupon to cart or copy coupon code to clipboard
    }
}


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

JS
TS
Java
Kotlin
ObjectiveC
Swift
Dart
|
function onCooeeCTAListener(payload) {
    if (!payload) {
        return;
    }

    if (payload.get("actionType") == "SEARCH") {
        if(payload.get("query")) {
            const query = payload.get("query");
            // Search provided text for user.
        } else if(payload.get("categories")) {
            const categories = payload.get("categories");
            // Search provided categories for user.
        } else if(payload.get("categories")) {
            const tags = payload.get("tags");
            // Search provided tags for user.
        }
    }
}




Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Educational Apps
NEXT
Video Apps
Docs powered by archbee 
TABLE OF CONTENTS
View Item
Properties
Code Example
View Category
Properties
Code Example
Add to Cart
Properties
Code Example
Apply Coupon
Properties
Code Example
Search
Properties
Code Example