The Ecommerce plugin works with WooCommerce to manage voucher generation and delivery for Snapplify Asset products. By integrating the plugin with the Snapplify Voucher API, you can automate key processes such as:
- Generating vouchers upon successful order completion.
- Emailing vouchers directly to customers.
- Tracking order statuses programmatically.
If you aren't using WordPress, you can still integrate with us, Read this article to learn how the Catalogue API works.
In order to run a WordPress plugin, you must have a WordPress site with a WooCommerce plugin.
NB: All prices are sent to you as VAT exclusive, so you'll need to ensure that your WooCommerce settings are configured to set up the tax percentage and display the price inclusive of tax. For assistance with this, please refer to the WooCommerce documents here.
The plugin operates by listening for the woocommerce_order_payment_status_changed event, which is triggered whenever a WooCommerce order transitions to a paid status.
Once this event occurs:
- The plugin initiates a request to the Snapplify Voucher API to generate a voucher for the purchased product(s).
- The API responds with a voucher, which is automatically emailed to the customer.
- The order status is updated programmatically based on the API call’s success or failure.
This setup ensures a streamlined process for managing digital assets, minimizing manual intervention.
Installation and Configuration
- Install the Plugin:
Download the plugin from the WooCommerce store using this link. - Activate the Plugin:
Go to the Plugins section in WordPress and activate the Ecommerce plugin. - On the Snapplify Ecommerce Management Settings page, find your ‘Authentication Token’ and ‘Product Feed Webhook URL’.
- Email these details to [email protected].
- Snapplify will then send you the API key
- Enter API Credentials:
- Navigate to the plugin settings in WordPress.
- Add the API key provided by Snapplify to authenticate the plugin.
- Save your settings.
- Map Products:
Ensure that WooCommerce products correspond to the correct Snapplify Asset IDs in your store's database.
Our team will complete the configuration on our side and respond to confirm that things are running.
Custom Order Statuses
The plugin introduces two custom order statuses for tracking the voucher generation process:
1. Processing via Snapplify
- When It’s Used: This status is applied automatically when the plugin is preparing to make an API call to the Snapplify Voucher API.
- Next Steps: If the API call succeeds, the status changes to Processing.
2. Snapplify Error
- When It’s Used: This status appears if the API call fails due to a network error, configuration issue, or other technical problems.
- Admin Actions Required:
- Change the order status to Pending Payment.
- Change it back to Processing to retry the API call.
Note: These statuses are managed programmatically by the plugin and cannot be manually set by users.
Standard Workflow
Here’s an overview of how the plugin operates:
- Customer Checkout: The customer completes their order using a valid payment method.
- Trigger API: WooCommerce triggers the woocommerce_order_payment_status_changed event.
- Voucher Generation: The Snapplify Voucher API generates a voucher for the purchased product(s).
- Email Delivery: The voucher is emailed to the customer automatically.
- Order Updates: Order notes are updated, and the status transitions to Processing.
Once you have run the Snapplify Ecommerce plugin, you'll need to manage the plugin through the WooCommerce settings.
Need help? Use the live chat in the bottom right corner of your screen or email us at [email protected].