MuleSoft & AI - Retail Demo
Francesco Suraci
? - Presales Senior Specialist Solution Engineer - 1st and only Italian to write for the official Mulesoft Blog - ?
Digital transformation is a tall order at the top of every organization’s to-do list. But what’s driving this trend that’s disrupting industries and redefining business models? Retailers and consumer goods companies are trying to navigate a confusing new world. IT is overburdened, stakeholders are frustrated, budgets are deflating, and initiatives face delays. There’s an endless list of initiatives that outline how businesses can act on digital transformation, but the why always leads back to the customer. In this scenario, adopting new technologies like AI helps to solve the existing gap and improve the customer experience.
Description
The purpose of this article is to show how is possible to use Mulesoft and AI? to simulate a retail shop online that create a new and great customer experience.
There are different systems involved such as Salesforce, Database, Vector Database and RAG for the AI.
?
?
?
Capabilities
What are the features and capabilities regarding this new experience provided by this Retail shop online?
Here you can find the most important:
? ?????????????? ????.
? Includes ?????? (??????????????????-?????????????????? ????????????????????).
? Add item to ???????????? ???? and to Shopping Cart from ??????.
? Query via ???????? ?????????? for both Shopping Cart and Full Catalog data from Vector DB.
? Query via ?????????? ?????????? for both Shopping Cart and Full Catalog data from Vector DB.
? ???????????? ???? ????????????????.
? ?????????????????? ???? ???????????????? in different languages.
? ?????????????????????? ???????? ???????????????????? for PriceBook, Products and other SObjects.
? ???????????? ???? ?????????? record on Salesforce.
? ???????? ???? ?????????? with order summary information.
?
A customer can then access the shop and interact through different channels to find all the necessary information powered by the AI.
?
Systems Involved
In this image you can see the most important Systems that are involved and their engagement / relationship with the Mule AI Chain connectors.
?
?
Functionalities
We start from the Homepage. There are some Products in the catalog, there is the? Shopping Cart and the Profile informations. How you can see, the Shopping Cart is disabled for now. It will be enabled when you insert your first product inside it.
?
?
?
There is also, of course, a chat. You can use it for query the dataset (from Shopping Cart or from the entire full catalog), listen the response, translate the response and an interesting feature: query using your vocal input.
?
?
?
?
?
?
Then, after this overview, let see how it works.
You can see the products that are inside the catalog, choose the product of your interest and add it to the Shopping Cart.
?
When you add a product to the Shopping Cart, what happens in the background?
?
In the background, using the ProductId, the technical sheet of the relevant product is read and the data is inserted into the Vector Database. This is possible via the MAC Vector connector and the 'Embedding Add Document to Store' operation which adds a document into an embedding store and exports it to a file. The document is ingested into external vector database.
Now, you can see the Shopping Cart enabled!
?
If we add a second product to the Shopping Cart, we have:
?
In this scenario there are two products inside the Shopping Cart and we can query the dataset using the Chat.
领英推荐
?
We can ask any question to the AI. The answers will be provided based on the data present in the Vector DB and which refer to the products present in the Shopping Cart or those present in the entire catalog.?
Ask for example: “Are there any yellow product in my Shopping Cart?”
?
This is the response that the AI returns us. The response is correct, there are not products of yellow color inside the Shopping Cart.
?
What happens in the background?
?
The 'Embedding Query from Store' operation of the MAC Vector connector is used which retrieves information based on a plain text prompt from an embedding store. The response provided is then 'enriched' through the use of the Mulesoft AI Chain' connector which via the 'Agent Define Prompt Template' operation that allows to define and compose AI functions using plain text, enabling the creation of natural language prompts, generating responses, extracting information, invoking other prompts, or performing any text-based task
But ask for something else. For example: “Give me some more informations about the red product in my shopping cart”
?
As you can see, now we received a response with some data and informations:
?
But an important feature of this customer-AI iteration is that you can use your voice to ask questions, and you can also listen to the answers that the AI provides you.
?
Again, what happens in the background? What mechanisms are there that allow us to listen to the responses provided by AI??
In this scenario, the MAC Whisperer Connector was used which, through the 'Text to speech' operation, takes the response previously provided by the AI and converts it into an audio file.
This file is then embedded in the html code so that it can be used through a media player
But let's continue to explore the other features of this new customer experience.
What if we want to have the answer in another language? No problem, we use Translate!
?
?
What happens in the background?
?
Once the language is chosen, this information is passed to the AI which, through the Mulesoft AI Chain connector, uses the 'Chat Answer Prompt' operator that uses a plain text prompt as input (in this case it is a combo between 'chosen language' and 'answer' obtained previously) and responds with a plain text answer, which is nothing more than our translated answer.
Perfect, now we can place our order:?
?By selecting our Shopping Cart we can see the products we have added, their prices and the shipping cost price. Once we have checked if everything is correct, by clicking on 'Order' we will create our order.
What happened now? An order was created in Salesforce, through a data orchestration between different SObjects and an email was sent with the relevant information of our order.??
The last check of what happens in the background.
?Here there is an orchestration between different Salesforce SObjects (PriceBook, Products, PriceBookEntry) that then process and create a new Order record on our CRM.
Once the Order is created, the information is then retrieved to compose the body of the email that will then be sent to our customer.
Conclusion
Then, we saw how it is possible to create a Retail online shop using Mulesoft and other tools, connectors, systems. Not only integration but also Artificial Intelligence.
Ease of implementation, use and above all versatility and pleasure of interacting with AI in a conversational way, ensuring the best customer experience using the latest technologies on the market.
That's all!
If you are curious to see a full tour of how it works, check out the attached video!
Demo Video
Making Digital Transformation meaningful, sustainable and with a positive social contribution
1 周Francesco Coffaro, Rajiv Gogri, Mario Orgaz álvarez, Roberto Forno
Senior Manager SE at MuleSoft, a Salesforce company
1 周Great work Francesco Suraci! You really demonstrate the power and benefits of Mulesoft in GenAI projects
?? AI Whisperer ??
1 周Mihael Bosnjak Viktoriya Kotik fyi