If you want to send messages to external services via API, you can set up callbacks from processes. Callback is a special function that transfers data to external systems. This can be useful, for example, if you have an external service for processing the client database, and you want to transfer data from GetCourse there about the users who performed a particular action configured in one of your processes.
To do this, when configuring the process, add the “Request URL” operation:
In the link, you need to specify the address (URL) of the external service and list the data to be transferred from GetCourse.
For example, the following syntax can be used in a user-defined process:
api_url/?var_1={object.first_name}&var_2={object.email}&...
Then, instead of {object.first_name}, the request will contain the user's name, and instead of {object.email} - the user's email address. Other variables can be used, you can see the full list below.
It is very important to specify the variables correctly.
You can choose the method of data transfer: GET or POST (but regardless of the option you select, all data will be transferred in the link specified in the URL column).
Complete list of variables that can be used in the link:
- first_name - first name,
- last_name - last name,
- name - full name,
- id - user identifier,
- email - email address,
- phone - phone number,
- city - city,
- avatar_url - link to the user's avatar,
- field header - data from the additional user field, you need to enter the full header of the field, the value of which should be transferred.
- number - order number,
- id - order identifier,
- positions - order composition (names of offers,
- offers - order content (offers’ IDs),
- cost_money - order cost with a space,
- cost_money_value - cost of the order without a space,
- left_cost_money - how much is left to pay,
- payed_money - how much was paid,
- status - order status,
- payment_link - payment link,
- promocode - if a promo code is used in the order, you can transfer its name.
Also, the order has a special user field, by which you can get additional data about the customer who placed the order: user.first_name, etc. (see above).
- product_title - product name,
- start_at - purchase start date,
- finish_at - purchase end date,
- start_at_ago - time elapsed from start,
- finish_at_ago - time remaining until the end,
- period_string - access period,
- state - purchase status (current state),
- link - link to purchase,
- training_link - link to training (if the product is related to training),
- training_title - the name of the training,
- training_teacher_full_name - full name of the main teacher of a training,
- training_teacher_avatar_src - path to the teacher's avatar file.
A purchase, both like an order, has a special user field, by which you can get additional data about the customer who made the purchase: user.first_name, etc. (see above).
4. Partner of the user:
- partner.uid - partner’s identifier,
- partner.first_name - partner’s first name,
- partner.last_name - partner’s last name,
- partner.real_name - partner’s automatic name in Russian,
- partner.email - partner’s address email,
- partner.phone - partner's phone number,
- partner.created_at - partner’s registration date.
5. User source (session during which he registered):
- create_session.gcpc - partner code,
- create_session.utm_source - UTM tags,
- create_session.utm_medium
- create_session.utm_campaign
- create_session.utm_content
- create_session.utm_term
- create_session.utm_group
- create_session.clickid etc.
You can add any custom parameter to the link - if a new visitor follows this link and registers, the parameter will be recorded to the user's source and can be passed via the API.
After requesting the URL, you can get the server's response and save it in an additional user field to use later (for example, in a mailing):
You can test the operation of the callback, for example, through the RequestBin service — create a RequestBin and send a URL request with the necessary parameters to this address.
After that, you will see the result with the transferred data.
An example of a request in the process of orders:
https://eno41mj4mvpuwhz.m.pipedream.net/?name={object.user.first_name}&mail={object.user.email}&phone={object.user.phone}&number={object.number}&positions={object.positions}&cost={object.cost_money}
Result:
We use technology such as cookies on our website to personalize content and ads, provide media features, and analyze our traffic. By using the GetCourse website you agree with our Privacy Policy and Cookies Policy.
please authorize