Working with http requests in triggers
Copy the link to the article
Copied

You can send information from RetailCRM to an external system using a trigger with an http request.

Note

The value of the parameters of the http request are specified in the twig format, therefore, to create such triggers, you need to study the syntax of twig templates.

5 optional fields are available when creating a request:

  • Address - the full url address is specified before the script, which will accept the values ​​sent from the system
  • HTTP headers - these are optional optional, but you can specify HTTP headers if required
  • HTTP method - the following methods are available: GET, HEAD, PATCH, POST, PUT
  • Pass parameters - the option to choose how the parameters will be passed: in the query string, in the request body (urlencode) or by specifying the request body yourself.
  • Parameters - a block with parameters that must be transferred from the system.

When creating a parameter, the name of the parameter is specified on the left side, and the value of the parameter on the right side. For example:

name \ value

orderId \ { order.id }}

customerId \ {{ order.customer.id }}

All parameter values ​​available for use can be accessed in the reference book of objects.

In the system actions log, you can track the sending of an http request, as well as the response received from your server.

Thank you for your feedback.
Was this article helpful?
No
  • Рекомендации не помогли
  • Нет ответа на мой вопрос
  • Текст трудно понять
  • Не нравится описанный функционал
Yes
Previous article
Checking the executions of triggers and validation
If you need to check a trigger or validation for correct functioning, you can use the actions log, which displays each execution and, if it occurs, an error with a detailed description.
#}