Service Help – SchedulerWebhookPost
The Sharperlight service offers a wide variety of presentation methods, each with its own set of parameters.
In this post, we will introduce the following method from among the various presentation methods available.
http://abcd.com/mdService1Rest/SchedulerWebhookPost/…
{sharperlight service url}/Help#SchedulerWebhookPost
|
Execute a Scheduled Task on the Server from a Webhook where normally the payload is JSON or XML Webhooks are called by external services and are used as a means of passing data across Services without polling The Scheduled Task can obtain the POSTed data via the Task Parameter called Post e.g. {_Task.Param.Post} To customize the response set a Task Parameter named TaskResponse or Task.Response with a blank value e.g. TaskResponse= Then use an Action to set the customised response via a Query or JavaScript that set the Task Parameter with a value e.g. JavaScript would be lib_task.ParamSet(‘Task.Response’,'{ “code”: 1234}’); e.g. Query would check the Task parameters checkbox and have a Query Outut named TaskResponse
http://sharperlight-my/mdService1Rest/SchedulerWebhookPost?task=TK1113115208&response=json Please see the Developers tab in Scheduler and the Client Secret Button to generate a Client Secret so the Webhook can be trusted by Sharperlight The Client Secret is placed in the Header in the Authorization section. HEADER { “Authorization”: “SLCS_30316661333232662d393631612d343237622d383137622d3362336535616330346633665f65316565313830302d326333342d343864322d623937362d3536613962373131613531665aZ” } |
|
| task=[taskCode] | The Scheduler unique task code e.g. &task=Email.Sales |
| service=[serviceCode] | If there are multiple Remote Connections to various Service you will need to set the Service code to target e.g. &service=002 |
| p(n)=[value] | Scheduled task may have parameters defined. You can override these by the position number in the list e.g. &p3=2018-09-23 |
| pwd=[codeOrEncrtped] |
The Scheduler Task may be protected with a password in the Task Parameters – Allow Query Execution section use the &pwd=xxxxx url parmameter to set the password – It can be obfuscated by encoding the password as base64 or Tripple DES encrypt it using the Task unique code or Author as the DES password e.g. &pwd=23kds53ss |
| usid=[sessionid] | User Session ID |
| response=[default|json] | The format of the response e.g. &response=json |
| callback=[funcName] | The Javascript JSONP callback function name (optional) e.g. &callback=TaskDone |
| messageOK=[value] | Override the Message format so that your own text is displayed e.g. &messageOK=Done |
| messageError=[value] | Override the error Message format so that your own text is displayed if an error occurs e.g. &messageError=Failed |
| messageTitle=[value] | Override the Message format so that your own text is displayed (Title above message) e.g. &messageTitle=Status |
