- WDI Plugin Installation
- Basic WDI Plugin Configuration
- Basic Docebo Account Configuration
- Basic WooCommerce Configuration
- Basic Configuration Testing
- Advanced Configurations
- Creating Docebo Custom User Fields
- Mapping WordPress User Meta Fields to Docebo User Fields
- Start Dates and Expiration Dates
- Learning Plans, Courses, User Groups, and Branches
- Configuring Docebo Email Notifications
- Subscription Products
- Using the Debug Log
- Security Checks
- Docebo plugin for WordPress and SSO (Single Sign-On)
- WooCommerce Action Hooks used by the WDI plugin
This documentation outlines the steps for configuring the WooCommerce Docebo Integration Plugin by Red Earth Design, Inc. The abbreviation “WDI” will be used in place of “WooCommerce Docebo Integration” throughout this documentation.
The WooCommerce Docebo Integration Plugin by Red Earth Design, Inc. offers a solution for monetizing Docebo LMS assets through the popular WordPress e-commerce platform, WooCommerce. Using this plugin, WooCommerce products can be associated directly with any combination of four Docebo asset types: learning plans, courses, user groups, and branches. When a customer purchases a WC product that is associated with a Docebo asset, that customer is added to the Docebo users database and enrolled in the associated learning plan, course, user group, or branch.
These are the minimum requirements to utilize the WDI plugin:
- A current Docebo LMS “Growth” or “Enterprise” plan
- WordPress 4.7 or a higher version
- WooCommerce 3.0 or a higher version
- Administrative access to your Docebo dashboard and WordPress site
- A Superadmin Docebo account is required for Docebo API authentication
The WooCommerce Docebo Integration Plugin provides the following features:
- Seamlessly integrates WooCommerce with Docebo LMS
- Securely connects to Docebo API using OAuth2 protocol
- Secures API credentials using 256 bit symmetric key encryption
- Creates Docebo LMS users from WooCommerce customers
- Monetizes Docebo assets using WooCommerce products
- Enrolls WooCommerce customers at checkout into:
- Docebo courses
- Docebo learning plans
- Docebo user groups
- Docebo branches
- Updates Docebo user fields using WooCommerce billing & shipping fields
- Dynamic mapping of user metadata, order metadata, and product metadata to up to 50 Docebo additional user fields
- Automatically maintains a current product inventory list
- Triggers optional Docebo notifications
- Integrates with these plugins:
- WooCommerce Subscriptions
- WooCommerce All Products For Subscriptions
- WooCommerce Product Bundles
- Advanced Custom Fields
- Flexible Checkout Fields
- Variable expiration dates for user accounts and course enrollments
- Variable expiration dates for courses bundled in learning plans
- Automatic updates triggered by subscription renewals
- Syncs course enrollment validity dates when subscription is updated
- Variable subscription & variable product course validity start & end dates
- Future payment start dates for variable subscriptions
- Customizable subscription + variants price descriptions
- Provides the following technical support features:
- Built in debug logging system
- Helpful admin notifications
- Detailed user documentation
- Security tips with salts and keys generators
- Works synergistically with the Docebo plugin for WordPress to provide additional features such as SSO (Single Sign-On) between WP and Docebo LMS
2. WDI Plugin Installation:
Make sure you have the WooCommerce plugin installed, activated, and up to date.
Install the WooCommerce Docebo Integration plugin by Red Earth Design using the WordPress plugins dashboard by uploading the zipped archive of the plugin provided and clicking the “Install Now” button.
Activate the WooCommerce Docebo Integration plugin by clicking the “Activate Plugin” button.
3. Basic WDI Plugin Configuration:
Open the WooCommerce Docebo Integration Settings dashboard by clicking on the “Settings” link provided in the WDI Plugin description on the WordPress plugins dashboard.
The WooCommerce Docebo Integration Settings dashboard can also be accessed from the WordPress admin menu by clicking the “WC Docebo” menu link provided. The WDI Settings dashboard is organized into three tabs: “General Settings”, “Authentication”, and “Map User Fields”. You can now begin configuring the plugin starting with the “General Settings” tab.
For the most basic setup leave the “Enable Expiration Dates”, “Enable Field Encryption” and “Enable Debug Logging” checkboxes unchecked. For now skip the “Security Optimization Tips”. Securing your site and API credentials will be covered later on. Click the “Save Changes” button. After the General Settings have saved you will see a “Settings saved” message above the settings menu tabs. If this is your first time installing the WDI plugin you will also see some notifications that can help guide you through the configuration process.
Click on the “Authentication” tab in the WDI Settings to setup the Docebo API connection. If you have an OAuth2 app installed and configured in your Docebo account you can enter your credentials into the WDI Settings Authentication form then click the “Save changes” button. If you need help setting up the OAuth2 app in your Docebo account skip to the next section “Basic Docebo Account Configuration“. Once you have the OAuth2 account setup and enabled in your Docebo account return to this step to fill in your OAuth2 credentials. The account used for connecting the Docebo API must be a Superadmin account. Power users and other user levels do not have access to the Docebo API get token endpoint.
4. Basic Docebo Account Configuration:
Log into your Docebo dashboard using your administrator account credentials. You should see a screen that looks like the image below.
Click on the gear icon in the top right corner of the Docebo dashboard. This will open the Docebo settings dashboard which looks like the image below.
If you do not already have the “API and SSO” app activated in your Docebo account you will need to perform the following steps to activate it and configure it for use with the WDI Plugin. The first step is to click on the “Add New Apps” tab found at the top center of the Docebo settings dashboard. This is shown in the image above. After you click on the “Add New Apps” tab you will see the Docebo apps dashboard which looks like the image below.
Click on the “Third Party Integrations” menu link seen on the left hand side of the dashboard.
The app that we are adding shows up at the top of the list, “API and SSO”. Note: this app is available starting from the Docebo “Growth” plan. So if you are unable to use this app it could be because you need to upgrade your Docebo plan to the “Growth” plan or higher. Click on the “TRY IT FOR FREE” link displayed to the right of the app description. You may see a popup that lets you know when your free trial will expire, and you will be required to upgrade to the “Growth” plan to continue using the “API and SSO” app unless you already are on this plan or a higher plan. If that popup shows just click the “TRY IT FOR FREE” button again displayed in the popup. Then you will see this popup showing that the app has been added:
Click on the “GO TO MY APPS” button to take you back to the Docebo “My Apps” dashboard. The “My Apps” dashboard should now show that the “API and SSO” app is active. Click on the gear icon on the right next to the red “X” and “Active” label.
This will open the settings for the API and SSO app which looks like this:
Click on the “API Credentials” menu link seen on the left. This will open a screen that allows you to create a new OAuth2 app which will be used to connect your WordPress site to your Docebo Account using the WDI plugin.
Click on the “Add OAuth2 App” button with the padlock icon. This will open a popup that will allow you to configure an OAuth2 app to connect the WDI plugin to your Docebo account.
- Give the App a name that makes it easy to distinguish from other OAuth2 apps in your Docebo account. For example “WDI Plugin Oauth2 App for the XYZ WooCommerce store”.
- Give the app a description that explains how the app will be used. For example “This app will be used to connect the XYZ WooCommerce store with the XYZ Docebo account using the WooCommerce Docebo Integration plugin by Red Earth Design, Inc.”
- Upload an image for the app icon to help distinguish it from other OAuth2 apps in your Docebo account. The logo for your WC store for example.
- For the Client ID use a machine friendly slug without any spaces or special characters. All lowercase letters is preferred. For example “wdipluginfordomainxyz”.
- The Client Secret is automatically generated for you.
- The Redirect URI should be the URL for the homepage of your WordPress WooCommerce site.
- Check the “Show Advanced Settings” box, and check the first three grant types.
Once filled out it should look something like this:
Click the “Confirm” button and you will now see your new OAuth2 app appear in the list of apps. If you need to make any changes you can click the edit icon which looks like a pencil and paper on the right between the checkmark icon and the x icon.
Activate the new OAuth2 app by clicking the checkmark icon on the right. The icon will turn a bright green showing that this app is now active like in the image below. To test the Oauth2 app go back to the Basic WDI Plugin Configuration section at Step 3: Connect the Docebo API.
5: Basic WooCommerce Configuration:
Create a new product in WooCommerce or open an existing product and scroll down to the “Product data” metabox. Match the settings seen in the image below: “Simple product” with “Virtual” checked. Open the “Inventory” tab and make sure “Sold individually” is checked. If your Docebo account has courses they should show up as options in the “Docebo course” dropdown. Select a course to associate with this product. Once you have completed these configuration updates click the update button to save the product. Make sure the product is published so that it can be added to the cart in your WooCommerce shop.
WooCommerce allows for a variety of scenarios regarding user account creation during checkout. WooCommerce can automatically handle the creation of WordPress users during checkout or allow existing WordPress users to log into their account during checkout or allow guests to checkout without creating a WordPress user account. WooCommerce can auto-generate new user passwords as well. Any of these scenarios can be configured to work with the WDI plugin. The following configuration will trigger WooCommerce to create new users in WordPress during checkout and auto-generate passwords for the users. This configuration is useful for implementations where you require matching usernames in both WordPress and Docebo. These are the suggested settings for the basic configuration of the WDI plugin.
6: Basic Configuration Testing:
Now that you have a basic configuration of the WDI plugin setup it’s time to test it out. The basic configuration described in the documentation up to this point consists of a WooCommerce virtual product that is associated with a Docebo course. The expected behavior with this basic configuration is that a new customer that purchases this product will be added as a user to the WordPress site as well as the Docebo account, and they will be enrolled in the course. In order to verify that everything is working as expected make sure you are logged out of your WordPress site and visit your WC storefront. Add the WC product that is associated with the Docebo course to your cart. During checkout create a test user that is easy to distinguish from real users. The username will be built using the first and last name billing fields.
Notice the “Cash on Delivery” or COD option was used in this example. This is a handy option for testing orders because it allows the order to transition from pending to processing without requiring a credit card transaction taking place. The order status must switch from pending to processing for the WDI transactions to take place. Once the order is placed you should see your “Order Received” or “Thank you” page indicating the checkout form was submitted and is being processed. This will differ from theme to theme, but the basic information presented will look something like the image below.
7: Advanced Configurations:
Creating Docebo Custom User Fields
Mapping WordPress User Meta Fields to Docebo User Fields
- Custom Checkout Meta Fields
- Primary User Fields
- Additional User Fields
The Custom Meta Fields are text fields where information can be passed with all WDI orders and mapped to additional user fields in Docebo. This could include labels for campaigns or which WordPress instance the order came from for example. This could be a filter that is used for dynamic rules configured in Docebo as well.
The Primary User Fields allow for the mapping of the Docebo user account first name, last name, and email to be mapped to billing fields or user meta fields or custom checkout fields.
The Additional User Fields can map any user meta field, billing field, or custom checkout field to the custom additional user fields that you added in Docebo in the previous section.
The Additional User Field select fields show a list of all meta fields available including custom fields created using custom field plugins. This allows you to add custom fields to the WC checkout forms that map directly to custom user fields in Docebo. The label of these select fields comes from the Docebo additional user fields, and the fields from the WordPress site such as custom billing fields are what populates the dropdown lists.
Start Dates and Expiration Dates
Learning Plans, Courses, User Groups, and Branches
At the top of the WDI plugin settings tabs you will notice some links. These are quick links to the Docebo dashboards for managing users, user fields, groups, courses, and learning plans. Click on the learning plans link.
The learning plans quick link will open your learning plans management dashboard in Docebo where you can add new learning plans and edit existing learning plans.
Click on the courses quick link to open the Docebo course management dashboard. You can add new courses similar to how you added learning plans, and you can associate courses with products in WC the same way you did with learning plans in the steps above. When you create a new course in Docebo that you are planning to associate with a product in WC make sure you select the e-learning course type. See related images below.
Click on the user groups quick link to open the Docebo groups management dashboard. This is where you can add user groups. User groups can be useful when associated with courses. For example user groups can be used as a filter for email notifications. This allows you to create custom welcome emails for each course.
To set up and manage branches in Docebo see the Docebo documentation about organizational charts here:https://www.docebo.com/knowledge-base/elearning-how-to-create-an-organization-chart/Once you have branches set up in Docebo you can associate branches with WDI products in the product inventory settings as shown in the next screenshot.
Configuring Docebo Email Notifications
By associating a group with a course in the WC product settings you can use that association to automatically trigger a custom welcome email for that course. Open your Docebo dashboard and click on the gear icon in the top right corner of the Docebo dashboard to open the Docebo navigation pane. Then click on the manage notifications link to open the notifications dashboard.
Add a new notification by clicking the add notification button in the top left corner.
Set the event type to “User enrolled in course” and the notification type to “E-mail”. Add a code that will make it easy to recognize in the list of notifications. Also fill out the E-mail details and then hit next.
Associate the notification with a group. See image below.
Associate the notification with a course. See image below.
Select the user type.
Configure the notification email to send immediately when a user is enrolled.
In the WDI plugin general settings there is a checkbox labeled “Enable Docebo New User Notification”. When this setting is enabled the “User has been created (by administrator)” event will be triggered in Docebo whenever a new user is created by the WDI plugin.
This allows for an email to be sent to each new user when they are created in Docebo by the WDI plugin. There can also be multiple new user emails triggered in this way filtered by branches to customize the new user email by branch. The list of notifications in the image below shows two new user email notifications that are triggered by the “User has been created (by administrator)” event and filtered by branches.
8: Subscription Products
WooCommerce (WC) Subscription Plugin Integrations
The WDI Plugin allows for a wide variety of subscription product configurations by integrating with popular WC subscription plugins like the following:
- WooCommerce Subscriptions
- WooCommerce All Products For Subscriptions
- WooCommerce Product Bundles
These integrations make it possible to create simple subscription products, variable subscription products, and bundled subscription products.
This means combinations of courses and learning plans can be set up on a recurring payment schedule in WC while triggering the updating of start and expiration dates for those courses in Docebo when a subscription is automatically renewed in WC.
In order to set up subscription products to work with the WDI plugin at a minimum the WooCommerce Subscriptions plugin must be installed as well.
Also expiration dates must be enabled in the WDI plugin general settings. See how that is done here: Enable Expiration Dates
Example Variable Subscription Product Configuration
The following example shows the configuration for a variable subscription use case.
In this example the desired behavior is a product that has the following variations and sets the expiration dates on courses according to the recurring subscription payment schedule.
- 7 day trial that’s free, charged monthly, recurring and never ending
- 7 day trial that’s free, charged annually, recurring and never ending
Both variations will also be mapped to the same user group, and enroll the user in the same courses.
This configuration uses a Learning Plan for the collection of courses that the user will be enrolled in. If it were a single course we could associate a course instead. It is also possible to bundle multiple course products together if the WC Product Bundles plugin is installed.
The images below show the various steps to configure the WDI product and its variants in WordPress to work as a WDI variable subscription product with the desired attributes described above.
Using the Debug Log
The WDI Plugin was designed with security in mind. To optimize the security of your site certain steps must be taken. The first is to make sure your site has an SSL certificate and all pages are using the HTTPS protocol. Most web hosts have SSL certificates available for purchase. There are also free options such as Let’s Encrypt. Before setting up other security configurations make sure your site’s certificate is set up properly and is up to date, and that all pages are using https: and not http: in the URL. There are some helpful WordPress plugins for this as well.
In the general settings of the WDI Plugin you will see a section titled: Security Optimization Tips. This gives steps to prepare your site so that the WDI Plugin can use encryption. In order for the encryption to work you will need to make sure your Salts and Keys are updated in your site’s wp-config.php file. Random examples are generated on the general settings page to give you an idea of what it should look like. You may copy and paste the generated salts and keys into the wp-config.php file or create your own salts and keys using another method.
Docebo plugin for WordPress and SSO (Single Sign-On)
The Docebo plugin for WordPress is a separate plugin developed by Docebo that provides a single sign-on feature as well as a user synchronization feature and a listing of courses that can be displayed in a “My Courses” widget.
Yes, the WDI plugin can work on its own without the Docebo plugin for WordPress; however, there are useful features from both plugins that can work together to give a more complete feature set for some applications. If your application requires a single sign-on then that can be accomplished by using both plugins together.
We have come across a username pattern that breaks the SSO. If a username has a space in it, such as ‘user name’, this plugin adds a + for the space to get ‘user+name’ when it’s saved into the Docebo account. However, WordPress still has ‘user name’, which then doesn’t match ‘user+name’ so the account in WP and the account in Docebo are no longer matchable. This means the person can’t log into SSO because ‘user name’ does not = ‘user+name’.One simple solution for this is to use the user’s email address as their username. Email addresses are a unique identifier with no spaces that work well as a username especially when the user data is being stored in multiple databases.
When using SSO (Single Sign-On) for users to log into their Docebo account from WordPress keep in mind that the users will always log in from WordPress and not from Docebo. This is because the SSO app uses a token to sign the user into their Docebo account from WordPress. The user’s password is stored only in WordPress, and can only be changed in WordPress in order to keep the SSO login functionality synchronized between the two systems. The Docebo plugin for WordPress provides a widget for signing in that can be displayed on the front end of your WordPress site.For more information on the feature set of the Docebo plugin for WordPress and how to configure it please see the Docebo documentation found on the Docebo website here:
WooCommerce Action Hooks used by the WDI plugin
- “woocommerce_order_status_pending_to_processing” triggers WDI order transactions
- “woocommerce_subscription_payment_complete” triggers WDI subscription transactions
- “woocommerce_process_shop_subscription_meta” triggers WDI updated subscription transaction