Response for pending action

Description

To create a pending action in the widget and update the widget with APIs. You will have to set pending as true in the following widget actions if you want to perform this action. 
  1. banner
  2. section_edit
  3. widget_modification
  4. form

OAuth Scope:

SalesIQ.callbacks.UPDATE

Request Payload:

The ID will be available in the request parameter of each widget execution.
Example: request.get("id");

 

URL:

Copiedhttps://{[zohosalesiq_server_uri](https://www.zoho.com/salesiq/help/developer-section/rest-api-v2.html)}/api/v2/{screenname}/callbacks/{request_id}/widgetresponse

Example:

Copiedhttps://salesiq.zoho.com/api/v2/zylkerinc/callbacks/4fhgtd-hbnjwj-hbewjd-gyywye6/widgetresponse

Payload:

1. banner

Copied{
  				 "type":"banner",
   				"status":"success",
  				 "text":"text to be shown in a banner", 
  				 "refresh_section" : true
			}

2. sections_edit

Copied{
    "type":"sections_edit",
    "sections":[
        {
            "metric":{
                "layout":"metric",
                "data":[
                    {
                        "label":"Allowed",
                        "value":"10"
                    },
                    {
                        "label":"Active",
                        "value":"6"
                    },
                    {
                        "label":"Total",
                        "value":"36",
                        "navigate":true,
                        "name":"total",
                        "link":"www.abc.com/1",
                        "link_hint":"Open ABC site - 20"
                    }
                ],
                "actions":[
                    {
                        "label":"Add record",
                        "name":"addRecord",
                        "disabled":"true/false"
                    }
                ],
                "title":"Users Count",
                "name":"users",
                "link":"",
                "link_hint":""
            }
        }
    ],
    "success_banner":"Data successfully updated",
    "failure_banner":"Error failed to update",
    "refresh_section":true
}
	

3. widget_modification

Copied{
    "type":"widget_modification",
    "success_banner":"widget section added",
    "failure_banner":"widget section failed to add",
    "actions":[
        {
            "type":"add_before",
            "name":"$sectionName",
            "section":{
                "metric":{
                    "layout":"metric",
                    "data":[
                        {
                            "label":"Allowed",
                            "value":"10"
                        },
                        {
                            "label":"Active",
                            "value":"6"
                        },
                        {
                            "label":"Total",
                            "value":"36",
                            "navigate":true,
                            "name":"total",
                            "link":"www.abc.com/1",
                            "link_hint":"Open ABC site - 20"
                        }
                    ],
                    "actions":[
                        {
                            "label":"Add record",
                            "name":"addRecord",
                            "disabled":"true/false"
                        }
                    ],
                    "title":"Users Count",
                    "name":"users",
                    "link":"",
                    "link_hint":""
                }
            }
        }
    ]
}