widget_detail
The response of the Detail Handler must always be of the type widget_detail and based on this response, the widget will be rendered. This contains the entire structure of the widget.
Parameter | Description | Datatype | Max Limit |
type | Type of response - widget_detail | String | - |
sections | List of sections - Metric, Fieldset, Info, Listing, Empty Section | List | 5 |
Sample Script (Deluge):
response = Map(); response.put("type","widget_detail"); // Customer Level as Metrix with options to upgrade / Downgrade membership and Cancel membership metrix = {{"label":"Points","value":"382"},{"label":"Membership","value":"Gold"},{"label":"Expires","value":"Dec 6, 20"}}; metricSection = {"name":"levelSection","layout":"metric","title":"Customer Level","data":metrix,"actions":{{"label":"Upgrade / Downgrade","name":"changeLevel"},{"label":"Cancel","name":"cancel"}},"reference_id":"tonysmiles@gmail.com"}; // Customer Account info in fieldset layout fieldSet = {{"label":"Login ID","value":"tonysmiles@gmail.com"},{"label":"Full Name","value":"Tony"},{"label":"Gender","value":"Male"},{"label":"Created on","value":"Dec 6, 2019"}}; fieldsetSection = {"name":"accountSection","layout":"fieldset","title":"Account info","data":fieldSet,"link_hint":"Click to view complete profile","link":"https://crm.zoho.com/crm/org639615593/tab/Leads/2285439000001987010"}; // Recent Purchases in listing layout listing = {{"name":"HO340WA52EIPHTFUR","title":"₹ 37,900","text":"Tiago Engineered Wood Four Door Wardrobe in Wenge Colour by HomeTown","subtext":"Shipped | Jun 28, 2020","link":"https://www.zylkerfurnitures.com/tiago-engineered-wood-four-door-wardrobe-in-wenge-colour-by-hometown/sku/HO340WA52EIPHTFUR","link_hint":"Click to view product"},{"name":"HO340FU60GNZHTFUR","title":"₹ 11,900","text":"Paris Fabric Office Chair in Black Colour by HomeTown","subtext":"Delivered | Jun 3, 2020","link":"https://www.zylkerfurnitures.com/paris-fabric-office-chair-in-black-colour-by-hometown/sku/HO340FU60GNZHTFUR","link_hint":"Click to view product"},{"name":"HO340KD19FDCHTFUR","title":"₹ 8,995","text":"Vento Metal Dining Chair Set of Six in Black Colour by HomeTown","subtext":"Delivered | Mar 1, 2020","link":"https://www.zylkerfurnitures.com/vento-metal-dining-chair-set-of-six-in-black-colour-by-hometown/sku/HO340KD19FDCHTFUR","link_hint":"Click to view product"},{"name":"HO340SO62AENHTFUR","title":"₹ 43,900","text":"Rhea Fabric Three Seater sofa in Brown Colour by HomeTown","subtext":"Delivered | Jan 23, 2020","link":"https://www.zylkerfurnitures.com/rhea-fabric-three-seater-sofa-in-brown-colour-by-hometown/sku/HO340SO62AENHTFUR","link_hint":"Click to view product"}}; listingSection = {"name":"purchases","layout":"listing","search":true,"navigate":true,"title":"Recent Purchases","data":listing}; // Requests to return products in empty section emptySection = {"name":"returned","title":"Requests to return","layout":"empty","text":"There are no pending requests","logo_url":"https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcQyNSwPUoYjGXBg9V9pvtijQRpy0_M50DTpYw&usqp=CAU","actions":{{"name":"addReturnRequest","label":"Add request"}}}; // Sections sections = {metricSection,fieldsetSection,listingSection,emptySection}; response.put("sections",sections); return response;