WooCommerce Connector
Overview
The WooCommerce Connector allows external e-commerce transactions on WordPress sites to automatically provision services within the SureInk platform. This is typically used for self-service portal purchases or third-party storefront integrations.
Data Synchronization Flow
- Customer Data: New orders in WooCommerce trigger the creation of a
CustomerandUserin SureInk if they do not already exist. - Order Data: Successful WooCommerce orders are imported as
Ordersin SureInk. - Provisioning: Based on the product SKU in the WooCommerce order, the corresponding
Licenseis automatically generated and assigned.
Connector Sync Actions
| Direction | Entity Sync'd | Summary | Trigger | Primary Code Modules |
|---|---|---|---|---|
| Inbound | WC Order → Customer/User | Creates new SureInk customers/users from external orders. | Automatic (Webhook) | WooCommerceWebHookController.java |
| Inbound | WC Order → License | Provisions new licenses in SureInk based on WC products. | Automatic (Webhook) | WooCommerceWebHookController.java |
Major Code Modules (com.sureink.connector.external.wordpress)
WooCommerceWebHookController: The primary entry point for WooCommerce webhooks. It validates the payload and initiates the internal workflow.service:- Order Transformation: Maps WC order line items to SureInk product catalog items.
- Automated Provisioning: Programmatically calls internal services to create Orgs and Licenses for the new customer.
Linkages and References
- Parent Service: Part of the
sureink-connectormicroservice. - Authentication: Uses shared secrets (
WOOCOMMERCE_WEBHOOK_SECRET) to verify the authenticity of the incoming webhooks. - Downstream Links: Calls
sureink-user-managementandsureink-cloud-msato complete the onboarding flow.
External References
Glossary
- API: Application Programming Interface - A set of definitions and protocols for building and integrating application software.
- DTO: Data Transfer Object - An object that carries data between processes.
- MSA: Master Subscription Agreement - The primary contract governing the relationship between the platform provider and the subscriber.
- SKU: Stock Keeping Unit - A unique identifier for each distinct product and service that can be purchased.
- UI: User Interface - The space where interactions between humans and machines occur.
- WC: WooCommerce - An open-source e-commerce plugin for WordPress.