Example of Haut.AI SaaS integration with Klaviyo via Zapier
This page describes how to pass data from Haut.AI to Klaviyo via Zapier
Last updated
This page describes how to pass data from Haut.AI to Klaviyo via Zapier
Last updated
Integration with external platforms via webhooks is available for all plans.
To use webhooks in Zapier, you need a "Professional" plan in Zapier or higher.
You can check Zapier plans and pricing here: https://zapier.com/pricing.
To integrate Haut.AI SaaS with Klaviyo via Zapier, you need to complete a few steps:
The first step is to receive data from SaaS to Zapier.
Login into your Zapier account.
Click on the "Create" button in the top-left corner.
Select "Zaps" in the dropdown.
You will see the blank canvas as shown below. Click on the "Trigger" area.
In the window that pops up, select "Webhooks by Zapier."
In the window on the right, click on the "Choose an event" dropdown and select "Catch Raw Hook."
Click "Continue" in the bottom right corner.
Click "Continue" again on the next step to skip it.
Copy the webhook URL by clicking on the "Copy" button.
Now go to your Haut.AI account,
Go to "Dataset" and open the dataset connected to your Skin Consultant App. You can find this dataset by going to the Skin Consultant App and clicking on ID of the Linked dataset.
Click "Settings" in the top menu of the Dataset.
Scroll down to the "Webhook (for developers)" section.
Paste the URL that you copied from Zapier to the URL field.
In the "Authorization method" field, select "Basic."
In the "Authorization key" and "Authorization value" fields, paste any value because Zapier does not require authorization.
In the "Request method" field, select "POST."
To add Survey answers to the webhook, select "Add survey answers to webhook." See how to configure Survey questions in Step 1.
Select "Merge webhooks" to receive one webhooks for all attached applications.
Click "Save changes."
The next step is to check that data received from SaaS is visible in Zapier.
Open your Skin Consultant App.
Conduct skin analysis.
Go back to your Zapier account.
Click "Test trigger."
If everything is set correctly, you can see webhook results.
If you click on the record, you will see skin something similar to the screen below.
Select the record and click "Continue with selected record."
The key important step is to parse received data in order to prepare it for connection with your 3rd party platform (e.g. Klaviyo)
For the action step, select "Code by Zapier"
In the window on the right, select "Run Python" and click "Continue."
Now, you need to feel the "Input Data."
Paste raw_data
into the left field, as shown on the screen below
Click on the "+" button and select "Raw Body"
Copy and paste the following code in to the "Code" field and click "Continue".
Click on the "Test step" button.
Check the test results and move to the next step.
In rare cases, a photo may take longer than usual to process (more than 60 seconds). In such cases, if you choose the ‘merge webhooks’ option, you will get two webhooks:
The first webhook will include the results of applications that were completed within 60 seconds. This webhook will contain the parameter "event": "photo_calculated_by_all_apps_timeout"
The second will include all results from all applications. This webhook will contain the parameter This webhook will contain the parameter "event": "photo_calculated_by_all_apps"
Click "Add step"
Select "Filter by Zapier"
Select "Event" as a field
Select "(Text) Does not contain"
Paste timeout
into the text field
Now, your Zap will send data to Klaviyo only if the data is complete
Skip this step if you do not collect users phone number
Click on the "+" button on the canvas and select "Formatter" by Zapier
Click on the "Action event" dropdown, select "Numbers," and click "Continue."
In the next step, click the "+" icon and select the data item with a phone number from the list. For the format, select "E164" and choose the country code. Click "Continue."
Click on the "+" button on the canvas.
Type "Klaviyo" in the search field and select it from the search results.
Click on the "Action event" dropdown and select "Create Profile."
Click on the "Account" and connect your Klaviyo account. Once you connect the account, click "Continue."
Now, you need to map all the structured data from the previous step with Klaviyo fields. For the skin analysis results and subject ID, add custom properties.
Once you finish mapping, click "Continue" and then click "Test step." Check if new record appears in Klaviyo.
If everything works correctly, click on the "Publish" button.