Automatically Generate Leads in Shopify
To increase e-commerce sales, you may want to integrate with Shopify. With Auth0, you can not only configure Shopify as a social identity provider out-of-the-box, you can also automatically generate leads in Shopify using a specialized rule template.
In this example, we will use a rule to automatically generate a lead with Shopify when a user authenticates. To connect your app to Shopify, you will:
1. Set up your app in Shopify 2. Get your Shopify credentials 3. Create and activate a rule in Auth0
Before connecting your Auth0 app to Shopify, you must sign up for and configure your account with Shopify.
Set up your app in Shopify
Create an app in Shopify and generate credentials for it, using Shopify's Authenticate a Private App with Shopify Admin. During this process, Shopify will generate an API Key and API Password for your application; make note of these.
Get your Shopify credentials
You will also need to get your Shopify API URL. To learn about the structure of your Shopify API URL, see Shopify's Make Your First Shopify API Request.
Once you have retrieved your Shopify API URL, keep this value on hand because we will use it in the next step.
Create and activate a rule in Auth0
Set up a rule in Auth0. While setting up your rule, select the shopify-leads-from-login template from the Webhook section, then use the following settings:
|SHOPIFY_API_KEY||API Key for the application you previously set up in Shopify.|
|SHOPIFY_API_PWD||API Password for the application you previously set up in Shopify.|
|SHOPIFY_API_URL||Your Shopify API URL.|
You can also use global variables to configure these in your rule.
By default, your rule will be activated upon save.