Detail Handler
The Detail Handler can be used to configure the information that will be displayed when a widget is rendered. The code/script for the entire structure of the widget is declared here. In general, widgets are comprised of different sections. There are six different sections to build the widget.
| Parameters | Description | 
| operator | Details of the operator who is accessing the widget | 
| environment | Details of the environment in which SalesIQ has been accessed | 
| context | Context for which the widget is being invoked | 
 
Sample Script (Deluge):
Copiedresponse = 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":"gold"
                                              };
                    /* 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://www.zylker.com/zylkerinc/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":"HO340FU28GPFHTFUR","title":"₹ 18,995","text":"Castle Engineered Wood Study Table in Highgloss White & Pink Colour by HomeTown","subtext":"Delivered | Apr 14, 2020","link":"https://www.zylkerfurnitures.com/castle-engineered-wood-study-table-in-highgloss-white-and-pink-colour-by-hometown/sku/HO340FU28GPFHTFUR","link_hint":"Click to view product"},
                                   {"name":"EA921CR91NXCHTFUR","title":"₹ 399","text":"Floral Print Polyester Door Curtain in Brown Colour by Easy Life","subtext":"Delivered | Apr 3, 2020","link":"https://www.zylkerfurnitures.com/floral-print-polyester-door-curtain-in-brown-colour-by-easy-life/sku/EA921CR91NXCHTFUR","link_hint":"Click to view product"}, 
                                   {"name":"HO340KD18ZKJINDFUR","title":"₹ 2,399","text":"Living Essence Oil And Vinegar Bottle With Salt And Pepper Storage 5 Pcs","subtext":"Returned | Apr 3, 2020","link":"https://www.zylkerfurnitures.com/living-essence-oil-and-vinegar-bottle-with-salt-and-pepper-storage-5-pcs/sku/HO340KD18ZKJINDFUR","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",
                                                   "actions":{{"name":"addReturnRequest","label":"Add request"}}
                                               };
                    /*Sections*/
                    sections = {metricSection,fieldsetSection,listingSection,emptySection};
                    response.put("sections",sections);
                    return response;
                    }