At the simplest level, integration is the process of combining two or more things to create a whole. For businesses, this means bringing together multiple business systems to operate as a collaborative unit and allow information to be shared between the connected systems. However, this still requires a fixed set of rules to route information to specific endpoints.
Machine learning is a subset of AI which allows a machine to automatically learn from past data without programming explicitly. This can be applied to integration scenarios to enable dynamic or “intelligent” routing of information across multiple endpoints based on its content.
This blog post shows how Anypoint Platform and Salesforce Einstein allow organizations to leverage AI and machine learning without the need to stand up large data platforms to transform their customer engagement approach.
What does Einstein do?
Einstein Vision and Language APIs are part of the Einstein Platform Services technologies and you can use them to AI-enabled apps. There are several sets of APIs available:
- Vision: Image recognition, object detection, and optical character recognition
- Language: Sentiment analysis for analysing sentiment in social media posts, intent APIs to categorize unstructured text into user-defined labels to better understand what users are trying to accomplish.
There are no data prep or managing complex models across huge data lakes needed to use Einstein — just put the data into Salesforce, through the APIs and it works.
MuleSoft and Einstein together
I originally investigated this over two years ago, looking at how MuleSoft could leverage some of the Salesforce platform technologies and Einstein Intent APIs. Einstein was just starting to be embedded in the Salesforce Platform and is now at a level of maturity to revisit a range of use cases where MuleSoft and Einstein could be used together.
I have taken the standard Einstein Intent Trailhead content and model and adapted it using API-led connectivity instead of a code-based approach in Salesforce Apex, to show how a fictitious online shoe retailer could automatically route free text questions to the right department.
The questions are submitted through a web page where MuleSoft communicates with Einstein to categorize the questions as either sales, service, or finance-related. It then orchestrates the information to either Sales Cloud, Service Cloud, or a Finance system simulated in a MySQL Database. You can say “I’d like to buy a new pair of your latest sports shoes,” or “I’ve got a problem with my new shoes,” or “I haven’t been invoiced for my order yet,” and they will be directed to the right department.
A model has been trained with data, through the Einstein Intent APIs so free text questions can be directed through the natural language (NLS) APIs and a probability of which category the question belongs to. The original data to build the model is in the Trailhead referenced above but has been adapted with only three labels: Sales Opportunity, Service, and Finance.
This is a simplified routing process to show the concept of “intelligent routing” and you could apply any number of different steps or choices based on your specific business process.
Applying this to API-led connectivity
The example outlined in the diagram below uses MuleSoft’s API-led approach to implement the solution:
A set of System APIs, using out-of-the-box connectors to Salesforce and MYSQL, provides a standardized interface into the backend systems, abstracting the complexity of these systems into a simple, easy to use set of APIs to update Sales Cloud, Service Cloud, and MYSQL.
At the Process layer, the Intelligent Routing API contains the orchestration logic to route the request to the right System API and calls the Einstein Intent APIs directly to pass the question and get back the probability of which route it should go down. If there is no clear route, then it can default to creating a new case in Service Cloud to be dealt with by a service agent.
A single Experience API is provided in this example that a web page can call to pass the captured question from the organisation’s website. Different Experience APIs can be implemented for different consuming applications, which still reuse the same Process API.
Flexibility to swap out different backend systems is enabled with this approach. If, for example, the organization has different service systems for different geographies or decides to change its finance system, the Intelligent Routing Process API simply re-points to the new System API or even uses the same API specification and the systems are swapped out transparently underneath.
More Process APIs can be introduced to provide enhanced intelligence as and when required without affecting existing logic. This overall approach gives the agility the business requires to enhance and change its processes when needed.
This shows the Intelligent Routing Process API
Using an API-led approach and Salesforce’s Einstein provides a flexible way to orchestrate information leveraging AI and machine learning, quickly and easily and is a powerful combination.
Look out for part two of this series, which goes through the process and setup step by step.
To learn more about automation, download our CIO guide to enabling business automation whitepaper.