Webhook
Table of Contents
Setup
To enable the webhook, you need to set your webhook URL in your funnel's settings in our app.
Webhook payload
The webhook will be sent as a POST request with a JSON body. The body will contain the following properties:
Property | Type | Description |
---|---|---|
action | string | "AskStella Analysis Completed" (Name of event) |
askstella_funnel_name | string | Short name of the funnel in which this analysis was performed |
askstella_funnel_value | string | A custom value you can define in the webhook settings |
askstella_analysis_id | string | The analysis ID in our system |
askstella_analysis_url | string | URL of the analysis results page for this user |
askstella_analysis_result | string | One of our color types (LIGHT, LIGHT_WARM, WARM, DEEP, VERY_DEEP, SOFT_LIGHT, SOFT_MEDIUM, SOFT_DEEP, SOFT_VERY_DEEP, CLEAR) |
askstella_first_name | string | First name of the user |
askstella_last_name | string | Last name of the user |
askstella_email | string | Email of the user |
askstella_hair_color | string | The hair color the user selected (VERY_LIGHT, MEDIUM_BLONDE, LIGHT, RED_BLONDE, RED, MID_BROWN, BROWN, BLACK) |
askstella_eye_color | string | The eye color the user selected (BLUE, GREY, GREEN, GREEN_BROWN, AMBER, BROWN, DARK_BROWN) |
askstella_skin_color | string | The skin color the user selected (FAIR, LIGHT, MEDIUM_LIGHT, MEDIUM, MEDIUM_DEEP, DEEP) |
askstella_query_string | string | The query string of the URL that led the user to the analysis (e.g. utm parameters you used) |
askstella_products_all | array | List of products (see below) |
In addition, if you have generic "single selection" steps in your funnel, we will also send the selected value of these steps as properties. The property name will be the step's key name and the key of the value:
askstella_[Step Key]: [Options Key] e.g. askstella_skin_dryness: VERY_DRY
Each product in the product list (askstella_products_all) will have the following properties:
Property | Type | Description |
---|---|---|
title | string | Name of the product |
image | string | Link to the product image |
short_description | string | Short description of the product |
color | string | HEX Color of the product |
link | string | Link to the product page (including the variant ID if necessary) |
Secure your endpoint
The optional api key you can provide in the webhook settings will be sent in the Authorization header of the request. You can then check for this header in your endpoint to ensure the request is coming from us. Of course also make sure that your endpoint will be called with https.
headers: { Authorization: `API-Key ${apiKey}`, "Content-Type": "application/json", Accept: "application/json", },