Mailerlite does not currently support bi-directional syncing between itself and shopify. Signups through a Mailerlite form are not created in Shopify. This means it's not possible to offer subscriber only discounts for example.
This Azure function solves that problem by providing an endpoint for a Mailerlite webhook that will create the customer in Shopify when the subscriber is created in Mailerlite.
NOTE: You will need to add a custom app to Shopify to obtain key and secret.
- Configure environment variables (details of variables are below)
- Deploy function
- Configure Mailertlite webhook with function endpoint URL
The following environment variables need to be configured:
Variable | Description |
apiversion | Shopify API version - https://shopify.dev/api/usage/versioning |
mailerliteapikey | Mailerlite API key - https://developers.mailerlite.com/docs/authentication |
shopifykey | Shopify key - https://shopify.dev/apps/auth/admin-app-access-tokens |
shopifysecret | Shopify secret - https://shopify.dev/apps/auth/admin-app-access-tokens |
shopurl | URL of your Shopify store. |
- Update "apiversion" to "shopifyapiversion" for consistency
- Terraform templates for provisioning
- More (and better) error handling
- More (and better) tests
- More customisation maybe?
- AWS Lambda maybe?