Display suggestions

It can be used to display response suggestions to visitors. These cards work in the same way as suggestions, but the difference is that, in display suggestions, even after an option is selected, the display card will not be hidden.

AttributeMandatoryDescriptionValues
textYesThe text to be shown above the card 

{

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

}

typeYesThe type of widget to be displayed to the visitor

{

"type": "suggestions",

}

phrasesYesResponse suggestions to be displayed to the visitor
{
   "phrases" : [
   {
       "text" : "What is SalesIQ?"
   },
   {
       "text" : "What is CRM?"
    }]
}


 

Channel compatibility and limitations

     

Pro Tip: Facebook Messenger, Instagram, WhatsApp, Telegram, and LINE channels do not support this card. However, you can handle it differently using the channel value in the visitor map. For example, provide an if condition statement (if the visitor's channel is Facebook or Instagram) and provide the options as a suggestion or single or multi-select option card. 

Syntax

Copied{
	"text" : "Your text here",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "Suggestion 1"
	},
	{
	"text" : "Suggestion 2"
	}]
}

Use Case

Copied{
	"text" : "Here are some of the related topics",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "What is SalesIQ?"
	},
	{
	"text" : "What is CRM?"
	}]
}
Copied// Context handler function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
    {
        "type": "suggestions",
        "text": "Here are some of the related topics",
        "phrases": [
            {
                "text": "What is SalesIQ?"
            },
            {
                "text": "What is CRM?"
            }
         ]
    }
]);

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", [
  {
	"text" : "Here are some of the related topics",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "What is SalesIQ?"
	},
	{
	"text" : "What is CRM?"
	}]
}
      ]
   }
]);

result.put("data", response);
return result;
Copied{
	"text" : "Here are some of the related topics",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "What is SalesIQ?"
	},
	{
	"text" : "What is CRM?"
	}]
}
Copied{
   "platform":"ZOHOSALESIQ",
   "action":"reply",
   "replies":[
      {
	"text" : "Here are some of the related topics",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "What is SalesIQ?"
	},
	{
	"text" : "What is CRM?"
	}]
}
   ]
}
Copied"user_defined": {
   "zohosalesiq":{
      "replies":[
         {
	"text" : "Here are some of the related topics",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "What is SalesIQ?"
	},
	{
	"text" : "What is CRM?"
	}]
}
      ]
   }
}
Copied"channelData": {
   "zohosalesiq":{
      "replies":[
        {
	"text" : "Here are some of the related topics",
	"type" : "suggestions",
	"phrases" : [
	{
	"text" : "What is SalesIQ?"
	},
	{
	"text" : "What is CRM?"
	}]
}
      ]
   }
}