Shopify Integration

Shopify provides an e-commerce platform. 
This article describes the steps of how you can integrate your Shopify store with EduBrite. 

Integration Covers

This integration will allow you to have your customers place orders using Shopify. Upon order acceptance, a notification will be sent to the LMS by Shopify. When this notification is received by EduBrite, it will perform the following actions:

If the order doesn't involve any item with more than 1 quantity, then:

  • The LMS will try to locate a user with a matching email ID of the customer (from the order details in cart).
  • If a user is not found, then a new user will get created using the Email as the username, First name, Last name, Address, City, State, Zip and Phone number (these fields must be captured in Shopify).
  • The user will be enrolled in the course session corresponding to the ordered item. The mapping of the Shopify item to a course session will be attempted by using the product's SKU and finding a course session in the LMS with a matching External ID.
  • If no course session is found, the LMS will try to locate a program session with an External ID matching the same SKU.
  • If a matching program session is found, then the user will be enrolled in it.
  • The enrollment will be performed for all ordered items in the same manner as described above.

If the order has an item with a quantity greater than 1:

  • A user will be located with a matching email; if not found, a new user will be created similar to the above case.
  • This order will be considered a Group order, and the LMS will perform the same steps as in the previous case and will try to find a matching course session or program session.
    • If a match is found, it will generate a full value coupon code for the mapped course session/program session with a usage count equal to the quantity of the item in the cart.
  • The coupon will be sent in an email to the user, who can share it with other users who need to enroll.

Setup

Step1:  - Access Shopify Settings -> Notifications -> Webhooks Section

Step 2 - Create a Webhook for the Order Creation and Order payment events. 

Notification URL -   http://<your-lms-microsite>/oltpublish/site/shopifyAction.do

Step 3 - Add both webhooks and copy the Shopify signature key.

Step 4 - In EduBrite, add the Shopify secret key and message expiry period (optional parameter) under Site Details -> Customization. Also, add the ID of the Training group (or any group where you will create the externally available course session or program session).

EXTERNAL_CAT_GROUP_ID=<Group-ID>
SHOPIFY_SECRET_KEY=<shopify-signature-key> 
SHOPIFY_MESSAGE_EXPIRY_PERIOD=<number-of-days>

Step 5: - Setting the course session and linking it with the Shopify product using SKU:

Create a course session and specify the external-ID.

In Shopify, setup the product and specify the SKU to be the same as the course session's external ID in the LMS.

 

Test the integration by setting up a low-priced product. 

 

NOTE: 

The LMS will try to locate a user with a matching email ID from the Shopify order details.

Recommended settings :

1.  Enforce Email ID uniqueness at the site level to ensure correct user account gets enrolled in the course session/program session/event.

2.  Use email as username - to keep user's email and username same. 

This setting can be enabled from Site Admin > Site Details  - Security tab.


Rating: