# Defining a Webhook parameter in Talend Studio

Available in...

* Cloud API Services Platform
* Cloud Big Data
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Integration
* Cloud Data Management Platform
* Data Fabric
* Qlik Cloud Enterprise Edition
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition

You can define a webhook context parameter in a Job to allow the web user to generate unique URLs of tasks from Talend Management Console. These URLs allow external applications (Salesforce, Box, Dropbox and so on) to trigger the execution of a task on any data change.

## Before you begin

The Job is open in Talend Studio and the Context view below the design workspace is selected.

## About this task

For example, the following Job retrieves contacts from Salesforce. You need to trigger the execution of the task every time the Salesforce contacts are updated. ![Job in the design workspace.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/use_case-webhook-job.png)

## Procedure

1. In the Talend Studio workspace, click the Context view.

   If the Context view does not show in Talend Studio, click Window &gt; Show view &gt; Talend , and select Context.
2. Click the [+] button in the Context view to add a line in the table.
   ### Example

   ![Context view.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/use_case-webhook.png)
3. Define the webhook context parameter following the pattern resource\_webhook\_payload, all in lower case.
4. Set the type of the parameter to String.
5. Enter the value for the webhook parameter.

   Webhooks must be defined in a JSON format, where:
   * type: media type of the payload taken from Content-Type header, for example, application/json.
   * data: payload data

   The following payload types are supported:
   * application/xml
   * application/json
   * text/plain
   * text/xml
   * Calls to the webhook endpoint with an empty payload are valid and supported.

   Example:
   ```
   [ { "type": "text/plain;charset=UTF-8", "data": "Some Data" }, { "type": "application/xml", "data": "<SomeXml/>" } ]
   ```

   The example above does not show the original structure of the request sent to the webhook. Instead, it illustrates the schema to which Talend Management Console converts the incoming data, as the resource\_webhook\_payload variable requires this format.

   Information noteImportant: Special response cases:
   * Salesforce: Calls with Salesforce-specific payloads (for example, containing the soap.sforce.com references) respond with 200 OK instead of 204 No Content, even when the response body is empty.
   * Dropbox: When the DropboxWebhooks/1.0 user-agent header is included in the request, the webhook responds with 200 OK and includes the value of the challenge parameter in the response body. For example, for a call similar to this one:
     ```
     GET https://webhooks.eu.cloud.talend.com/mywebhook/11fe60a514414a2a8b938b29084c4a29?challenge=parameter
     User-Agent: DropboxWebhooks/1.0
     ```

     The response body looks like:
     ```
     Response:
                parameter
                Content-Type: text/plain;charset=UTF-8
                Content-Length: 9
     ```
6. Right-click the Job in the Repository tree view and select Publish to Cloud.