Business process designer > Graphical elements / Webhook

Webhook

WH1The Webhook element automatically sends information from a process instance in BRIX to an external system.

As an example, let's consider a company that sells and ships equipment. A sales rep receives an order from a customer and sends it to the warehouse where the order is processed. After invoicing, the order is shipped, and the webhook automatically sends the order's details to the inventory management software.

clip0020

This way the company saves time on entering data and avoids human mistakes, such as specifying a wrong serial number.

начало внимание

Only users included in the Administrators group can manage webhook settings.

конец внимание

Add a webhook to the process

On the right pane, go to the Integrations tab and drag the Webhook element to the process diagram. Place the webhook in the part of the diagram where BRIX must send data to the external system.

WH2

Double-click on the webhook shape in the diagram to open its settings.

wh3

General tab

This tab is for creating the http-request. Fill out the form:

  • URL. Specify the request URL for addressing an API method of the external system, for example, http://example.com/api/create-order/. In this field, you can use process context variables and the DateTime function. To add a variable, click {+} on the right-hand side of the field. To use the DateTime function, click the function symbol {f }.  You can read more about using the DateTime function in the Item Name article.
  • Method. Select either GET or POST. If POST is selected, the additional Request Type field appears.
  • Request Type. For the POST method the JSON, FORM and TEXT types are available.
  • Data. Here you can link the process properties and request parameters. Click +Parameter and select a field in the Process field column, for example, Serial Number. The Request parameter field will be filled in automatically.

wh4

 

If you have selected TEXT in the Request type field, then in the Data field you will need to enter a text template that will be passed in the request. To create the template you can use text, process context variables, and the DateTime function.

wh5

To add a context variable, click the {+} sign on the right-hand side of the field. To use the DateTime function, click the function symbol {f }. You can read more about using the DateTime function in templates in the Item Name article.

Error Handling tab

In this tab, you can define the behavior of BRIX in case the external system returns an error.

wh7

If you want the system to resend the request, check the Retry box. Then select the number of retries and specify the delay in seconds between them.

wh6

If you want the system to send a notification about the error, check the Notification box. The Add button will appear. Click on it in order to select the users who must receive the notification.

wh8

If you want BRIX to interrupt this operation in case of an error, check the Interrupt box. Then select the connector that stands for the path that the process must take, for example, End process.

wh9

After having configured all the settings, click Save.