Integrations — A key for getting the most out of Salesforce

Chathura Ekanayake
Ballerina Swan Lake Tech Blog
7 min readNov 13, 2023

--

Salesforce is a great platform for managing all customer and sales data — from customer details, products, price books, and leads to sales transactions. A good, often customized, implementation of Salesforce would allow organizations to track a vast amount of information such as business transactions made by each customer, revenue by region, closing times per sales staff, and sales trends over a year. In addition, as everything related to sales is recorded in Salesforce, it is possible to take actions based on changes in data — for example, inform sales staff when a deal renewal is due.

Despite all the potential for facilitating near-perfect sales processes and customer service, Salesforce is mainly a sophisticated database for sales and customer information. In order to get the full potential from a Salesforce implementation, it is necessary to pump sales data into Salesforce and have methods in place to take actions based on data in Salesforce. How do we do that?… Via integrations.

In the rest of this article, we’ll see how Salesforce can be integrated with various customer touchpoints and systems to enable smooth sales and customer service processes. A working sample integration is also given with each section.

E-commerce platforms

In Business-to-Consumer (B2C) scenarios, customers usually place orders via online shopping portals, which are powered by e-commerce platforms like Shopify, WooCommerce, and Magento. In addition to placing orders, customers interact with these platforms for various other tasks such as self-signup, entering contact details, order tracking, and browsing product catalogs. Each of these activities generates valuable data about customers, which is useful to be captured in Salesforce.

For example, when a customer signs up, a new customer record can be created in Salesforce. When a customer places an order, a sales order record can be created in Salesforce. When a customer browses a product’s details, that customer’s reference can be recorded as a possible buyer under the corresponding product in Salesforce.

Sample: Update customer records in Salesforce, whenever a customer registers or updates details in Shopify.

ERP systems

ERP systems are the backbone of organizations, which can handle multiple business functions such as finance, purchasing, inventory, order fulfillment, shipments, and HR. Although customers usually do not directly interact with ERP systems, many customer-related activities are processed by those. For example, when a customer places an order, it will be captured in the ERP as a sales order. When a customer makes a payment, it will be captured by ERP’s accounting module. Shipments of ordered goods will also be processed by ERPs.

In this context, Salesforce to ERP integrations could trigger actions in ERP based on Salesforce operations and vice-versa. As an example, when an Opportunity is closed in Salesforce, a purchase order can be created in the ERP, and when goods are shipped from the ERP, the status of the corresponding Salesforce Opportunity can be updated.

Sample: Create a purchase order in SAP when an opportunity is closed in Salesforce.

Customer support systems

Vendors usually have agreements with customers to address product-related issues for a certain period of time. Customer support systems, such as Jira and ServiceNow, provide a platform for handling this customer support process effectively. Customers can log in to these systems and report issues, and vendors’ support staff can interact with customers via the system to resolve issues.

While customer support systems streamline the support process, those systems also gather valuable data for sales staff as well. The number of critical issues filed by a customer, issue resolution times, tone of customers’ comments (e.g. satisfied or frustrated), categories of issues filed (e.g. requesting new features, complaints on current features), etc. provide valuable sales insights. For example, if a customer has many critical issues and the tone of comments is frustrated, it’s not a good time to sell a new product.

Sample: When a high-priority issue is filed in ServiceNow, create a case in Salesforce and associate it with the corresponding customer account.

Productivity tools

Sales and customer data are often entered into office productivity tools such as Google Docs, Sheets, Mail, and Slack. For example, a salesperson may enter customer contacts obtained during a promotion event into Google Sheets. In addition, many discussions with customers occur via mail and chat platforms such as Slack. In order to get a full understanding of sales activities, all this information needs to be pumped into Salesforce.

One aspect we need to consider in this process is that most of the data in these tools are entered manually. Therefore, issues like spelling mistakes and omitted fields are common in this data. These issues need to be addressed during the data loading process to Salesforce.

Sample: Create contacts in Salesforce by reading contact details given in a Google Sheet.

B2B channels

EDI-based message exchanges are commonly used for B2B transactions. For example, when a retail outlet needs to purchase goods from a manufacturer, it can send an EDI purchase order message (e.g. X12 850 or EDIFACT ORDERS). These EDI messages contain a vast amount of details, which can be pumped into Salesforce for sales analysis and decision-making.

Sample: Update products associated with Salesforce opportunities based on products listed in EDIFACT Request for Quotation (REQOTE) messages.

Data sources

Data about business entities such as products, prices, sales outlets, and customer contacts may be managed by different business units. Therefore, this information could be stored in various data sources, such as relational databases, NoSQL databases, and in-house developed systems, maintained by those business units.

Certain data stored in such external data sources needs to be fetched into Salesforce. For example, product names, descriptions, and prices need to be fetched into Salesforce Products and Price books. Customer contacts can be fetched into Salesforce Contacts. In addition, as a result of company mergers or business consolidations, it may be necessary to do one-time imports of all sales-related data into Salesforce.

Sample: Import product data from a MySQL database into Salesforce.

Real-time data

Some business data like inventory levels, number of units sold per product, and shipment locations change constantly over time. When working with such data sources, target systems have to read data values constantly and apply the required processing steps.

For example, in the sales context, it may be necessary to display the current inventory level of each product in Salesforce. In order to do that, a program has to read inventory levels periodically, or listen to a data source (e.g. via a Kafka topic) and update Salesforce.

Sample: Update Salesforce price books by listening to price details published to a Kafka topic.

AI

A vast amount of information is captured in unstructured form such as emails, documents, slides, comments, and chats. For example, a prospect may send an email inquiring about the price and warranty information of certain products. Ideally, this needs to be captured as a lead in Salesforce with information such as prospect name, product name, and likelihood of buying. In situations like this, where the input is in natural language, AI can be employed to extract relevant details to be stored in Salesforce.

Sample: Extract lead details such as name, phone number and company from emails using OpenAI, and create corresponding leads in Salesforce.

Implementation

We have used Ballerina language for implementing all use cases discussed in this article. Ballerina is a language specifically designed for integrations, with many built-in connectors and support for complex data processing. Therefore, it simplifies the implementation of our use cases.

If we are planning to implement these Salesforce integrations in a real enterprise, we need to consider multiple aspects in addition to developing the integrations. First, we need to have separate environments for development, testing, staging, production, etc. Each environment has different parameters such as Salesforce URLs, ServiceNow URLs, credentials, and IP addresses. We need to maintain those and feed them to corresponding environments. A CI/CD pipeline is needed to build and migrate artifacts between environments. Each component needs to scale based on the load. Various observability methods have to be enabled to get insights into operations and for troubleshooting.

Ballerina language’s configuration mechanisms and observability features simplify the implementation of many of the above functions by utilizing common tools like Kubernetes, Helm, Jenkins, GitHub Actions, ELK, Prometheus, Jaeger, etc. Choreo platform is another option, if we don’t want to worry about any of the aspects we discussed in this section. All that is necessary to do is to point Choreo to the Ballerina code in GitHub. It will create production-ready Salesforce integrations from the code with built-in CI/CD, auto-scaling, and observability.

--

--