Webhook

Whenever a user completes an analysis in your funnel, we can send a webhook to a URL of your choice. This can be used to trigger further actions in your system, e.g. sending an email, adding the user to a mailing list, add user/event to your CRM, etc.

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:

PropertyTypeDescription
actionstring"AskStella Analysis Completed" (Name of event)
askstella_funnel_namestringShort name of the funnel in which this analysis was performed
askstella_funnel_valuestringA custom value you can define in the webhook settings
askstella_analysis_idstringThe analysis ID in our system
askstella_analysis_urlstringURL of the analysis results page for this user
askstella_analysis_resultstringOne of our color types (LIGHT, LIGHT_WARM, WARM, DEEP, VERY_DEEP, SOFT_LIGHT, SOFT_MEDIUM, SOFT_DEEP, SOFT_VERY_DEEP, CLEAR)
askstella_first_namestringFirst name of the user
askstella_last_namestringLast name of the user
askstella_emailstringEmail of the user
askstella_hair_colorstringThe hair color the user selected (VERY_LIGHT, MEDIUM_BLONDE, LIGHT, RED_BLONDE, RED, MID_BROWN, BROWN, BLACK)
askstella_eye_colorstringThe eye color the user selected (BLUE, GREY, GREEN, GREEN_BROWN, AMBER, BROWN, DARK_BROWN)
askstella_skin_colorstringThe skin color the user selected (FAIR, LIGHT, MEDIUM_LIGHT, MEDIUM, MEDIUM_DEEP, DEEP)
askstella_query_stringstringThe query string of the URL that led the user to the analysis (e.g. utm parameters you used)
askstella_products_allarrayList 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:

PropertyTypeDescription
titlestringName of the product
imagestringLink to the product image
short_descriptionstringShort description of the product
colorstringHEX Color of the product
linkstringLink 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",
},