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
Accountrecords are imported as SureInkCustomerentities. Updates in SureInk can also be pushed back to Salesforce. - Product Data: Salesforce
ProductandPricebookEntryrecords are synced to SureInkProductand pricing models. - Sales/Order Data: Salesforce
OpportunityandQuotedata are used to trigger the creation ofMaster Subscription AgreementsandLicensesin 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.
| Direction | Entity Sync'd | Summary | Trigger | Primary Code Modules |
|---|---|---|---|---|
| Inbound | Account → Customer | Imports Salesforce Accounts as SureInk Customers. Filters for the CUSTOMER/PROSPECT types. | Manual (UI Trigger) | SalesForceAccountDataService.java (L1-190) |
| Inbound | Product2 → Product | Synchronizes Salesforce product catalog/price books into SureInk. | Manual (UI Trigger) | SalesForceProductDataService.java |
| Inbound | Oppty Product → License | Converts Salesforce OpportunityLineItem into a SureInk License for provisioning. | Manual / Scheduled | SalesForceOpptyPendingOrdersService.java (L1-107) |
| Outbound | Customer → Account | Updates Salesforce Account metadata or creates new Accounts during registration. | Automatic (Kafka) | InternalKafkaListener.java (L1-88), SalesForceAccountDataService.java |
| Outbound | License → Oppty Product | Creates/Updates Salesforce Opportunities and products based on SureInk license events. | Automatic (Kafka) | LicenseToOpportunityService.java (L1-204) |
| Outbound | License → Stage Update | Advances Salesforce Opportunity stages (e.g. to Closed Won) when SureInk trials/orders close. | Automatic / API | SalesForceOpptyStageUpdateService.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
Accountobject also contains a specializedLicense_Type__cfield used for categorization during the import process.
Major Code Modules (com.sureink.connector.external.salesforce)
client: ContainsSalesForceAuthorizationfor OAuth2 handshakes andSalesForceQueryBasefor SOQL execution.controller:SalesForceDataControllerServiceprovides REST endpoints for the UI to trigger manual syncs.service.account: Manages the mapping and lifecycle ofAccounttoCustomer.service.product: HandlesProduct2andPricebookEntrysynchronization.service.salesforce.opportunity: Complex logic to transform Salesforce Opportunities/Quotes into SureInk subscriptions.mapper: Specialized classes likeCustomerMapperandLicenseToOpportunityMapperfor data transformation.
Linkages and References
- Parent Service: Part of the
sureink-connectormicroservice. - Core Systems: Communicates with
sureink-customerfor profile storage andsureink-cloud-msafor 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.