In the example provided, the serverless function can easily be deployed to Netlify and the code can be modified to suit any and all webhook events that are fired by Subscribe Pro (see Webhook Message Schema).
Instructions and additional details can be found in the repository.
Currently, Subscribe Pro's webhooks cannot be directly consumed by Klaviyo. However, with some additional effort, it is possible to use Subscribe Pro's webhooks with Klaviyo. Below is one example of the use of Klaviyo's "Flows" feature to include data from Subscribe Pro's webhooks within custom email templates.
- Parse data
- Build API calls to Klaviyo (using their docs)
- Send API calls to create profiles, trigger events, and pass data
- [Add screenshots/code blocks, etc.]
From the Klaviyo Dashboard, click Email Templates and then Create Template.
Choose a template. Name it and click Create Template. For this example, we will create our template to be used when a customer has signed up for a new subscription, so we'll call it "Subscription Created."
Design it however you'd like, including logos, copy, etc. Add our template variables...using Step 1...
We should now see that the new template has saved. Next, click Flows on the left navigation bar and click Create Flow.
Click Create from Scratch, give this flow a name (ex: Subscription Created), and click Create.
Next, for the Trigger, choose Metric and select the event you created in Step 1.
^finish this step
- Add info about lists/segments