Skip to main content

Salesforce Connector

Overview

The Salesforce Connector enables bi-directional data flow between the SureInk Platform and Salesforce. It ensures that customer profiles, product catalogs, and sales records are synchronized, allowing for a seamless transition from a Salesforce-driven sales process to SureInk-driven license and service management.

Data Synchronization Flow

  • Customer Data: Salesforce Account records are imported as SureInk Customer entities. Updates in SureInk can also be pushed back to Salesforce.
  • Product Data: Salesforce Product and PricebookEntry records are synced to SureInk Product and pricing models.
  • Sales/Order Data: Salesforce Opportunity and Quote data are used to trigger the creation of Master Subscription Agreements and Licenses in SureInk. Upon closing a deal in SureInk, the status can be synced back to Salesforce to close the Opportunity as "Won".

Connector Sync Actions

The following table summarizes how data is synchronized between Salesforce and SureInk.

DirectionEntity Sync'dSummaryTriggerPrimary Code Modules
InboundAccountCustomerImports Salesforce Accounts as SureInk Customers. Filters for the CUSTOMER/PROSPECT types.Manual (UI Trigger)SalesForceAccountDataService.java (L1-190)
InboundProduct2ProductSynchronizes Salesforce product catalog/price books into SureInk.Manual (UI Trigger)SalesForceProductDataService.java
InboundOppty ProductLicenseConverts Salesforce OpportunityLineItem into a SureInk License for provisioning.Manual / ScheduledSalesForceOpptyPendingOrdersService.java (L1-107)
OutboundCustomerAccountUpdates Salesforce Account metadata or creates new Accounts during registration.Automatic (Kafka)InternalKafkaListener.java (L1-88), SalesForceAccountDataService.java
OutboundLicenseOppty ProductCreates/Updates Salesforce Opportunities and products based on SureInk license events.Automatic (Kafka)LicenseToOpportunityService.java (L1-204)
OutboundLicenseStage UpdateAdvances Salesforce Opportunity stages (e.g. to Closed Won) when SureInk trials/orders close.Automatic / APISalesForceOpptyStageUpdateService.java (L1-75)

Note on Licensing: In Salesforce, licensing is primarily represented through the Opportunity Line Item (Product). The Connector maps these items to SureInk License entities. The Account object also contains a specialized License_Type__c field used for categorization during the import process.

Major Code Modules (com.sureink.connector.external.salesforce)

  • client: Contains SalesForceAuthorization for OAuth2 handshakes and SalesForceQueryBase for SOQL execution.
  • controller: SalesForceDataControllerService provides REST endpoints for the UI to trigger manual syncs.
  • service.account: Manages the mapping and lifecycle of Account to Customer.
  • service.product: Handles Product2 and PricebookEntry synchronization.
  • service.salesforce.opportunity: Complex logic to transform Salesforce Opportunities/Quotes into SureInk subscriptions.
  • mapper: Specialized classes like CustomerMapper and LicenseToOpportunityMapper for data transformation.

Linkages and References

  • Parent Service: Part of the sureink-connector microservice.
  • Core Systems: Communicates with sureink-customer for profile storage and sureink-cloud-msa for license management.
  • Messaging: Publishes sync status events to Kafka for audit logging.

External References

Glossary

  • CRM: Customer Relationship Management - A technology for managing all your company's relationships and interactions with customers and potential customers.
  • 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.
  • OAuth2: Open Authorization 2.0 - An industry-standard protocol for authorization.
  • REST: Representational State Transfer - An architectural style for providing standards between computer systems on the web.
  • SOQL: Salesforce Object Query Language - A language used to search your organization's Salesforce data for specific information.
  • UI: User Interface - The space where interactions between humans and machines occur.