Skip to main content

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 Customer and User in SureInk if they do not already exist.
  • Order Data: Successful WooCommerce orders are imported as Orders in SureInk.
  • Provisioning: Based on the product SKU in the WooCommerce order, the corresponding License is automatically generated and assigned.

Connector Sync Actions

DirectionEntity Sync'dSummaryTriggerPrimary Code Modules
InboundWC OrderCustomer/UserCreates new SureInk customers/users from external orders.Automatic (Webhook)WooCommerceWebHookController.java
InboundWC OrderLicenseProvisions 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-connector microservice.
  • Authentication: Uses shared secrets (WOOCOMMERCE_WEBHOOK_SECRET) to verify the authenticity of the incoming webhooks.
  • Downstream Links: Calls sureink-user-management and sureink-cloud-msa to 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.