Single product carousel 

This card helps to display multiple images for a single product. The actions will be common for all images(if used).

AttributeMandatoryDescriptionValues
textYesThe text to be shown above the card 

{

     "text":"Here are some of our products ",

}

titleYesProduct title

{

     "title":"Zylker Furniture",

}

subtitleNoProduct subtitle

{

     "subtitle":"Great furniture at affordable prices",

}

elementsYesList of images

{

      "elements": [

{ "id": "Double Bed", "image": "https://zylkerfurniture.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png" }, { "image": "https://images-na.ssl-images-zylkerfurniture.com/images/I/61wuHhZ0ZVL._SX355_.jpg", "id": "Wardrobe" } 

],

}

idYesID for each image

{

      "id": "Double Bed",

}

imageYesURL for each image

{

"image": "https://zylkerfurniture.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"

}

actionsNoList of links/buttons that can be used to goto a page or trigger an action in the client if requiredLearn More
labelYesThe content shown in the link

{

"label": "View more",

}

nameYesUnique name for the button

{

"name": "viewmore",

}

typeYesType of action (URL / client_action)

{

"type": "url",

}

linkYesIn case the type is URL, this is the link that opens when the button is clicked. 

{

"link": "https://www.zylkerfurniture.com/doublebed.html"

}

clientaction_nameYesIn case the type is client_action, the function specified in $zoho.salesiq.clientactions client object with this key will be invoked on click. 

{

"clientaction_name": "openBookingForm"

}


 

Channel compatibility and limitations

     

Facebook Messenger:

  • The card is supported on Facebook. 
  • When using this card, the images would be in a scrolling format along with clickable link buttons. A maximum of 3 buttons and 80 characters each is allowed. 
  • Only URL redirection is supported, and the client action is not supported on Facebook. 

Instagram:

  • The card is supported on Instagram. 
  • When using this card, the images would be in a scrolling format along with clickable link buttons. A maximum of 3 buttons and 80 characters each is allowed.
  • Only URL redirection is supported, and the client action is not supported on Instagram. 

WhatsApp:

  • The card is supported on WhatsApp. 
  • When using this card, the images will be displayed, followed by the title, description, and URL.
  • Only URL redirection is supported, and the client action is not supported on WhatsApp. 

Telegram:

  • The card is supported on Telegram. 
  • When using this card, the images will be displayed, followed by the title, description, and URL.
  • Only URL redirection is supported, and the client action is not supported on Telegram.  

Output

Syntax

Copied{
   "type":"single-product",
   "text":"Your text here",
   "title":"Your title here",
   "subtitle":"Your subtitle here",
   "elements":[
      {
         "id":"ID of the product",
         "image":"<Image URL>"
      },
      {
         "image":"<Image URL>",
         "id":"ID of the product"
      }
   ],
   "actions":[
      {
         "label":"Your label name",
         "name":"Button name",
         "type":"url",
         "link":"<Your URL>",
        "clientaction_name": "Your clientaction_name"
      }
   ]
}

Use Case

Copied{
    "type": "single-product",
    "text": "Here's the available MacBook Pro models",
    "title": "$2,499.00",
    "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
    "elements": [
        {
            "id": "Macbook view 1",
            "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
        },
        {
            "id": "Macbook view 2"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
        },
  {
            "id": "Macbook view 3"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
        }
    ],
    "actions": [
        {
            "label": "Know more",
            "name": "knowmore",
            "type": "url",
            "link": "https://www.zylkerstore.com/product/223433445.html"
        },
        {
            "label": "Open Booking form",
            "name": "book",
            "type": "client_action",
            "clientaction_name": "openBookingForm"
        }
    ]
}
Copied//Context function handler
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[
	{
    "type": "single-product",
    "text": "Here's the available MacBook Pro models",
    "title": "$2,499.00",
    "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
    "elements": [
        {
            "id": "Macbook view 1",
            "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
        },
        {
            "id": "Macbook view 2"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
        },
  {
            "id": "Macbook view 3"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
        }
    ],
    "actions": [
        {
            "label": "Know more",
            "name": "knowmore",
            "type": "url",
            "link": "https://www.zylkerstore.com/product/223433445.html"
        },
        {
            "label": "Open Booking form",
            "name": "book",
            "type": "client_action",
            "clientaction_name": "openBookingForm"
        }
    ]
}
]);

prompt = Map(); 
prompt.put("param_name", "reply"); 
prompt.put("data", response); 
result.put("prompt", prompt); 
result.put("todo", "prompt");
return result;

//Execution function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[
	{
    "type": "single-product",
    "text": "Here's the available MacBook Pro models",
    "title": "$2,499.00",
    "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
    "elements": [
        {
            "id": "Macbook view 1",
            "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
        },
        {
            "id": "Macbook view 2"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
        },
  {
            "id": "Macbook view 3"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
        }
    ],
    "actions": [
        {
            "label": "Know more",
            "name": "knowmore",
            "type": "url",
            "link": "https://www.zylkerstore.com/product/223433445.html"
        },
        {
            "label": "Open Booking form",
            "name": "book",
            "type": "client_action",
            "clientaction_name": "openBookingForm"
        }
    ]
}
]);

result.put("data", response);
return result;
Copied{
    "type": "single-product",
    "text": "Here's the available MacBook Pro models",
    "title": "$2,499.00",
    "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
    "elements": [
        {
            "id": "Macbook view 1",
            "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
        },
        {
            "id": "Macbook view 2"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
        },
  {
            "id": "Macbook view 3"
            "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
        }
    ],
    "actions": [
        {
            "label": "Know more",
            "name": "knowmore",
            "type": "url",
            "link": "https://www.zylkerstore.com/product/223433445.html"
        },
        {
            "label": "Open Booking form",
            "name": "book",
            "type": "client_action",
            "clientaction_name": "openBookingForm"
        }
    ]
}
Copied{
   "platform":"ZOHOSALESIQ",
   "action":"reply",
   "replies":[
   {
          "text": "Here's the available MacBook Pro models",
          "title": "$2,499.00",
          "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
          "elements": [
             {
                 "id": "Macbook view 1",
                 "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
              },
              {
                 "id": "Macbook view 2"
                 "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
              },
              {
                  "id": "Macbook view 3"
                 "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
              }
            ],
          "actions": [
             {
                 "label": "Know more",
                 "name": "knowmore",
                 "type": "URL",
                 "link": "https://www.zylkerstore.com/product/223433445.html"
              },
              {
                 "label": "Open Booking form",
                 "name": "book",
                 "type": "client_action",
                 "clientaction_name": "openBookingForm"
             }
         ]
      }
   ]  
}
Copied"user_defined":{
   "zohosalesiq":{
      "replies":[
	  {
          "text": "Here's the available MacBook Pro models",
          "title": "$2,499.00",
          "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
          "elements": [
             {
                 "id": "Macbook view 1",
                 "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
              },
              {
                 "id": "Macbook view 2"
                 "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
              },
              {
                  "id": "Macbook view 3"
                 "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
              }
            ],
          "actions": [
             {
                 "label": "Know more",
                 "name": "knowmore",
                 "type": "URL",
                 "link": "https://www.zylkerstore.com/product/223433445.html"
              },
              {
                 "label": "Open Booking form",
                 "name": "book",
                 "type": "client_action",
                 "clientaction_name": "openBookingForm"
           }
        ]
      }
    ]
  }
}
Copied"channelData": {
   "zohosalesiq":{
      "replies":[
	  {
          "text": "Here's the available MacBook Pro models",
          "title": "$2,499.00",
          "subtitle": "MacBook Pro - 14 inch | 1TB SSD Storage",
          "elements": [
             {
                 "id": "Macbook view 1",
                 "image": "https://zylkerstore.com/media/catalog/product/cache/1/thumbnail/1024x576/b58515f018eb873dafa430b6f9ae0c1e/f/r/front_1_.png"
              },
              {
                 "id": "Macbook view 2"
                 "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuHhZ0ZVL._SX355_.jpg",
              },
              {
                  "id": "Macbook view 3"
                 "image": "https://images-na.ssl-images-zylkerstore.com/images/I/61wuerngj0ZVL._XY445_.jpg",
              }
            ],
          "actions": [
             {
                 "label": "Know more",
                 "name": "knowmore",
                 "type": "URL",
                 "link": "https://www.zylkerstore.com/product/223433445.html"
              },
              {
                 "label": "Open Booking form",
                 "name": "book",
                 "type": "client_action",
                 "clientaction_name": "openBookingForm"
            }
         ]
       }
    ]
  }
}