Skip to main content

E-Commerce Integrations

UniPulse connects with three e-commerce platforms to sync products, track orders, and attribute revenue to social media posts.


Supported Platforms​

PlatformAuth MethodSync MethodWebhooksRevenue Attribution
ShopifyOAuth app installationREST + WebhooksYes (native)Yes (UTM)
WooCommerceREST API consumer key/secretREST + pollingLimitedYes (UTM)
EasyOrdersAPI keyREST + pollingNoYes (UTM)

API Endpoints​

All e-commerce routes are under /api/v1/ecommerce:

EndpointMethodDescriptionMin Role
/api/v1/ecommerce/shopifyPOSTConnect Shopify storeADMIN
/api/v1/ecommerce/woocommercePOSTConnect WooCommerce storeADMIN
/api/v1/ecommerce/easyordersPOSTConnect EasyOrders storeADMIN
/api/v1/ecommerce/productsGETList synced productsEDITOR
/api/v1/ecommerce/templatesCRUDProduct post templatesEDITOR
/api/v1/ecommerce/syncPOSTTrigger manual syncEDITOR

Shopify Integration​

Connection Flow​

Synced Data​

ResourceShopify APILocal ModelSync Frequency
ProductsGET /admin/api/products.jsonEcommerceProductWebhook + periodic
OrdersGET /admin/api/orders.jsonCommerceOrder + OrderLineItemWebhook + periodic
CustomersGET /admin/api/customers.jsonCommerceCustomerWebhook + periodic

Webhooks (Real-Time)​

Webhook TopicTriggerProcessing
orders/createNew order placedorder-sync queue -> revenue-attribution queue
orders/updatedOrder status changeorder-sync queue
products/updateProduct modifiedecommerce-sync queue
products/deleteProduct removedecommerce-sync queue

WooCommerce Integration​

Connection​

AuthenticationDetails
MethodREST API consumer key + consumer secret
Base URLhttps://{store-url}/wp-json/wc/v3/
Auth HeaderBasic auth or query parameter

Synced Data​

ResourceWooCommerce APISync Frequency
ProductsGET /wp-json/wc/v3/productsPeriodic polling (every 30 min)
OrdersGET /wp-json/wc/v3/ordersPeriodic polling (every 15 min)
CustomersGET /wp-json/wc/v3/customersPeriodic polling (every 1 hour)

EasyOrders Integration​

Connection​

AuthenticationDetails
MethodAPI key in request header
Provided byUser from EasyOrders dashboard

Synced Data​

ResourceSync Frequency
ProductsPeriodic polling (every 30 min)
OrdersPeriodic polling (every 15 min)

Sync Architecture​

QueuePurpose
ecommerce-syncSyncs products and basic store data
order-syncSyncs orders and line items
revenue-attributionMatches orders to social posts via UTM parameters

Revenue Attribution​

When a post is published with links, UTM parameters are automatically appended:

https://store.example.com/product?utm_source=instagram&utm_medium=social&utm_campaign=post_{postId}

When an order arrives with matching UTM parameters, the revenue-attribution queue creates a RevenueAttribution record linking the order to the originating post.

UTM ParameterValuePurpose
utm_sourcePlatform name (facebook, instagram, tiktok)Identify source platform
utm_mediumsocialIdentify channel type
utm_campaignpost_{postId}Link to specific post

Product Post Templates​

The ProductPostTemplate model allows creating reusable templates that auto-generate post captions from product data:

// Template example
const template = {
productId: 'prod_123',
templateContent: '🛍 New arrival: {{productName}} - {{price}}! Shop now: {{productUrl}}',
};

Database Models​

ModelPurpose
EcommerceStoreStore connection (provider, credentials, sync status)
EcommerceProductSynced product catalog
ProductPostTemplateProduct-to-post templates
CommerceCustomerCustomer records
CommerceOrderOrder records
OrderLineItemOrder line items
RevenueAttributionPost-to-order revenue attribution
PostRevenueAggregated revenue per post
CouponGeneratedAI-generated discount coupons

Cross-Reference