How hnql/test works
Project type and purpose
• This is a cross-cloud integration connector (“service-cloud-connector”) that synchronizes data between Salesforce B2C Commerce (Demandware/SFCC) and Salesforce Service Cloud “above the API.”
• Its code lives in two runtime contexts:
• Service Cloud (Apex classes, custom settings, connected app)
• B2C Commerce (OCAPI settings, cartridges, job scripts)
• It is delivered as an open-source tool (Salesforce Labs) that you install and configure rather than a monolithic full-stack app.
A. Service Cloud Environment
• Apex package: SCCConnectorPostInstallScript, custom objects, custom settings, field mappings
• CommerceCloudConnector Connected App (OAuth2 client)
• REST endpoints (auto-generated at runtime via service-cloud-connector)
B. B2C Commerce Environment
• Cartridges:
– plugin_service_cloud (OCAPI client configuration)
– int_service_cloud (job scripts: customerSync.js, orderSync.js; steptypes.json)
• Business Manager configurations:
– Remote Site Setting “SCCSG”
– Named Credentials: SFCCClientCreds, SFCCClientCredsBearer, SFCCUserCreds
– OCAPI Shop & Data API settings (wapi_shop_config.json, wapi_data_config.json)
– Custom Site Preferences & Custom Objects (for connector settings and auth token storage)
• Jobs: scc-customer-sync, scc-order-sync with scheduled steps
C. Deployment & Build Tooling
• Apache Ant under settings/sfsc/salesforce_ant_48.0 for deploying metadata to Service Cloud
• build.properties to configure Ant with org credentials and server URL
Architectural patterns and principles
• “Above the API” decoupling: Use of standard REST and OCAPI rather than hard-wired code
• Scheduled vs. real-time sync: configurable via site preference (“Is async mode…”)
• Secure credentials management: Named Credentials in Commerce and Connected App in Service Cloud
• Extensible cartridges: plugin + integration layer via SFCC cartridge path
Essential detail checklist
• Ant + build.properties → Service Cloud package
• Connected App OAuth2 handshake and callback URL
• Named Credentials and Remote Site Settings feeding into job scripts
• Job names (scc-customer-sync, scc-order-sync) and script file names
• OCAPI Shop & Data APIs with wapi_shop_config.json & wapi_data_config.json