Links for Zia Skills

You can display the links to the visitors along with the text and image using this widget.

AttributeMandatoryDescriptionValues
typeYesThe type of the input to be dispalyed to the visitorlinks
linksyesYou can specify the array of urls that you would like to display to the visitor

{          

  "url" : "zylker.com "       

}

Use Case:

Context Handler function:

Copiedresult = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [{
  "type": "links",
  "text": "Here are the references",
  "image": "http://zylker.com/help/common.png",
  "links": [
    {
      "url": "https://zylker.com/home",
      "text": "Zylker-home",
      "icon": "http://zylker.com/help/home.png"
    },
    {
      "url": "https://zylker.com/special-discounts",
      "text": "Zylker-discounts",
      "icon": "http://zylker.com/help/discounts.png"
    }
  ]
}]);
prompt = Map(); 
prompt.put("param_name", "reply"); 
prompt.put("data", response); 
result.put("prompt", prompt); 
result.put("todo", "prompt");
return result;

Execution function:

Copiedresult = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [{
  "type": "links",
  "text": "Here are the references",
  "image": "http://zylker.com/help/common.png",
  "links": [
    {
      "url": "https://zylker.com/home",
      "text": "Zylker-home",
      "icon": "http://zylker.com/help/home.png"
    },
    {
      "url": "https://zylker.com/special-discounts",
      "text": "Zylker-discounts",
      "icon": "http://zylker.com/help/discounts.png"
    }
  ]
}]);
result.put("data", response);
return result;

Output: