Follow the steps below to link your WooCommerce webshop to your Piggy account, so your customers can easily collect points on each purchase
Step 1. Getting your authentication information
To allow Piggy access to your WooCommerce orders, you must first create an API key in your WooCommerce back-office.
- Login to your WordPress back-office
- Navigate to the WooCommerce plugin, then go to Settings
- In the WooCommerce Settings, navigate to the Advanced tab
- Click on Rest API from the subtabs
- Click on Add Key
- Fill in a description of your choice, choose a user, and select Read/Write from the Permissions, then click Generate API key
The WooCommerce part is done! Now go the Business Dashboard and follow the steps below
Step 2. Installing the WooCommerce integration in the Business Dashboard
Once you've got an API key, the next and final step is entering the authentication information acquired in step 1 into the Piggy Business Dashboard
- Login to the Piggy Business Dashboard
- When logged in, click on the Tools (waffle) icon in the navigation bar on the top right
- From the dropdown menu, choose Integrations
- Search for the WooCommerce integration in the list of integrations, then click Install
- Enter all the information acquired from step 1, then click Start
🎉 Congratulations, your WooCommerce integration is now linked!
How does the WooCommerce integration work?
When an order is paid (i.e. the 'payment completed' event is fired in WooCommerce), a loyalty transaction is created for the full order value. That is including tax and shipping.
When a customer wants to (partially) refund their order and the points, use the Refund action readily available in WooCommerce. When a full refund is performed in WooCommerce, all of the points issued in the original order will be deducted from the Contact's balance. If a partial refund is performed in WooCommerce, points will be deducted proportionally (e.g. 50% of the total order price was refunded, therefore 50% of the total points issued will be deducted).