Overview This guide documents the integration setup for syncing HubSpot Deals to Business Central Sales Orders using Rapidi. The integration supports two scenarios based on HubSpot edition capabilities.
Integration Architecture Scenario 1: Enterprise Edition (with Operations Hub) Prerequisites:
HubSpot Enterprise or Professional edition with Operations Hub. Custom workflow capability in HubSpot ( provided by Rapidi). HubSpot Custom Fields Required:
Field Name Object Type Purpose bc_salesorder Deal Text Stores BC Sales Order Number erp_customer_no Deal Property Sync Syncs BC Customer Number from Company associated_deal_id Line Item Text Populated by custom workflow erp_sales_order_no Line Item Property Sync Stores BC Order Number on lines
Custom Workflow Configuration Purpose: Automatically populate associated_deal_id on line items with the parent Deal ID.
Workflow Setup:
Trigger: Line Item creation or Deal association. Action: Copy Deal's hs_object_id to Line Item's associated_deal_id. Scope: All line items associated with deals. Rapidi Setup Summary Transfer Structure:
Main Transfer: DEAL00_HUBSPOT_BC_SUBTR (Deals → Sales Orders) SubTransfer: DEAL00_HUBSPOT_BC_SUBTR_SUBTR001 (Line Items → Sales Order Lines) Detailed Flow:
Main Transfer Executes: Queries HubSpot for Deals where bc_salesorder is empty (new/unsynced deals). Pulls Deal data: deal name, close date, currency, customer number,etc. Creates Sales Order in Business Central or other D365 ERP. The ERP returns the new Sales Order Number (e.g., SO-10001) Rapidi Writes Back to HubSpot: Stores the BC Sales Order Number in the Deal's bc_salesorder field. SubTransfer Auto-Executes (Same Transaction): Triggered automatically for the same deal that was just processed. Uses LinkFilter: pulls Line Items where associated_deal_id = Deal's hs_object_id. This field was pre-populated by the custom HubSpot workflow. Pulls Line Item data: SKU, quantity, price. Creates Sales Order Lines in BC linked to the parent Sales Order. Result :Complete Sales Order (header + lines) created in BC in one operation. Deal marked as synced via bc_salesorder field. Scenario 2: Standard Edition (without Operations Hub) Prerequisites:
HubSpot Professional/Starter edition (no Operations Hub). Cannot use custom workflows. HubSpot Custom Fields Required:
Field Name Object Type Purpose bc_salesorder Deal Text Stores ERP Sales Order Number erp_customer_no Deal Property Sync Syncs ERP Customer Number from Company erp_sales_order_no Line Item Text It automatically stores the ERP Order Number transferred_to_erp Line Item Text Transfer control flag
Rapidi Setup Summary Transfer Structure:
Transfer 1: DEAL01_HUBSPOT_BC (Deals → Sales Orders) Transfer 2: DEAL02_HUBSPOT_BC (Line Items → Sales Order Lines) Detailed Flow:
Phase 1: Header Creation
Transfer DEAL01 Executes:Queries HubSpot for Deals where bc_salesorder is empty (new/unsynced deals). Pulls Deal data: deal name, close date, currency, customer number. Creates Sales Order header in the ERP. BC returns the new Sales Order Number (e.g., SO-10001). Rapidi Writes Back to HubSpot:Stores the BC Sales Order Number in the Deal's bc_salesorder field. HubSpot Property Sync Activates:Property sync field erp_sales_order_no on Line Items monitors the parent Deal. When Deal's bc_salesorder field gets populated, it syncs down to all associated Line Items. Each Line Item now has erp_sales_order_no = "SO-10001". Phase 2: Line Creation
Transfer DEAL02 Executes:Queries HubSpot for Line Items where:erp_sales_order_no HAS_PROPERTY (must be populated). transferred_to_erp is empty (not yet synced). Pulls Line Item data: SKU, quantity, price, and the erp_sales_order_no. Creates Sales Order Lines in BC. Uses erp_sales_order_no to match and link lines to the correct Sales Order header. Rapidi Marks Lines as Transferred:Updates Line Items in HubSpot with transferred_to_erp flag. Prevents duplicate line creation on subsequent runs. Result:Sales Order header exists from Phase 1. Sales Order lines now added and linked correctly. Both Deal and Line Items marked as synced.
Comment Editor X