Integrating webhooks in growth scenarios
FollowIntroduction
Webhook is a function that can send events about users passing a specific node in the Growth Scenario to the customers server.Through this function, customers can also receive data about users passing through specific nodes within the Growth Scenario.
Webhook settings
To set up webhooks
- Setting rules when webhook request fails
- Webhook Template Creation and Settings
You need to go through 2 steps:
Setting rules when webhook request fails
When a webhook request fails, set whether the failed user can participate in the next step.
-
Proceed to the next step.
- Users whose webhook request fails are moved to the next step.
-
Exit the user from this scenario cycle without moving on to the next step.
- Users whose webhook request fails are terminated without moving to the next step.
Failure and retry are determined depending on the response code returned by the server when WebHook.
Retries are attempted up to 3 times at 30 second intervals.
Retry policy after request failure
Response Code | Received or not | Retry? |
20x (success) | Yes | - |
30x (redirection) | No | |
408 (request timeout) | No | Yes |
429 (rate limited) | No | Yes |
Other 4xx (client error) | No | |
5xx (server error) | No | Yes |
Webhook Template Creation and Settings
To create a webhook template, select Create a new webhook template in the Webhook Wizard.
Click the “Add Webhook Template” button in the upper right corner of the Webhook Template list screen.
Afterwards, enter the required information for the WebHook Template.
name
Set the administrative name of the webhook.
Endpoint
Enter the server URL address to receive webhook data.
Http Method
Set the data transmission type. Type supports GET / POST type.
Http Header
Set the Header to be included in the webhook request.
basic parameters
Set the data to be delivered when webhooking. In Growth Action Webhook, the two parameters below must be transmitted by default.
- campaign_id: Growth Action campaign ID
- revision_no: Corresponding Growth Action campaign version
If you wish to receive additional data in addition to the parameters above, you can receive information about the user's device through a webhook through the definition macro list below.
This is a macro preset in DFINERY.When you enter the macro, the value is automatically filled in and sent based on the users information.
macro name | Type | explanation | Example |
adi | string | Google Advertising ID or Apple Advertising Identifier or Web Cookie ID | 0fa27c1e-9378-4d1c-8f01-118e094240e5 |
idfv | string | Apple Vendor ID | DE4BF1F6-0D95-4F94-A56C-B94E30EB73FE |
ad_id_opt_out | bool | Whether to limit ad tracking | FALSE |
is_push_enable | bool | Whether push is enabled or not | TRUE |
is_push_enable_os | bool | Whether the OS has push enabled or not | TRUE |
os | string | Device OS version | 7 |
model | string | Device model name | LG-F800L |
vendor | string | device manufacturer | LGE |
resolution | string | Device resolution (width x height) | 800x600 |
is_portrait | bool | Device orientation | FALSE |
network | string | Device network type | network |
platform | enum | device platform | 1 |
carrier | string | device carrier | SK Telecom |
language | string | device language | kr |
country | string | device country | en |
Additional parameters
In addition to the macros provided by DFINERY, you can add Custom Macros.
- Key: Enter the key value for Custom Macro. Only strings can be used.
- Type: Select the type corresponding to the Value of the Custom Macro. Types support String, Number, and Boolean.
- Description: Enter a description for the macro.
How to use Custom Macro
Custom macros are macros set directly by the customer. This custom macro can be used as follows:
Example: When a user sets a Custom Macro named “custom” as shown in the screenshot below.
In the Webhook settings within the Growth Scenario, enter the value appropriate for the specific node and transmit the value to the Webhook.