Setting Up Basic Messaging for Web Deployment (with MuleTrains Queue, Routing, and Omni-Channel Flow)
In today’s dynamic digital landscape, delivering exceptional customer support is essential. Salesforce offers powerful messaging capabilities that can be rapidly deployed on your website. This article will guide you through setting up basic messaging for web deployment. It will incorporate the crucial “MuleTrains Queue.” You will also learn about advanced routing configurations and an Omni-Channel flow to optimize your service agent’s efficiency.
Setting Up the Foundation: The MuleTrains Queue
First, let’s establish the backbone of our messaging management system: the “MuleTrains Queue.” This queue will act as a central hub. It will handle incoming messaging sessions. This ensures that no communication falls through the cracks.
Configuration Steps:
- Navigate to Queues: In Salesforce Setup, search for and select “Queues.”
- Create a New Queue: Click “New.”
- Enter Queue Details:
- Label: Enter “MuleTrains Queue.”
- Queue Name: Salesforce will automatically populate “MuleTrains_Queue.”
- Queue Email: Enter “k.sandeep5121@gmail.com” (or your preferred email).
- Supported Objects: In the “Supported Objects” section, add “Messaging Session.”
- Add Queue Members (Optional): Add users who will be able to access and manage the queue. Note: Selecting appropriate queue members is crucial for efficient management.
- Save: Click “Save.”

By configuring these settings, we’ve created a dedicated space for managing our messaging interactions. This ensures that all incoming sessions are organized and readily accessible to authorized users.
Creating a Messaging Channel
Now, let’s move on to creating the messaging channel.
Configuration Steps:
- Navigate to Messaging Settings: In Salesforce Setup, search for and select “Messaging Settings.”
- Create a New Channel: Click “New Channel.”
- Select Channel Type: Choose “Web.”
- Name the Channel: Provide a descriptive name for your channel, such as “Website Chat.”
- Save the Channel: Click “Save.”

This simple process creates the foundation for your web messaging deployment.
Enhancing Efficiency with Routing Configurations
With the “MuleTrains Queue” in place, we can now implement routing configurations. This will automate the distribution of messaging sessions to available agents. This ensures that sessions are handled promptly and efficiently, maximizing agent productivity and customer satisfaction.
Configuration Steps:
- Navigate to Routing Configurations: In Salesforce Setup, search for and select “Routing Configurations.”
- Create a New Routing Configuration: Click “New.”
- Enter Routing Configuration Details:
- Routing Configuration Name: Enter “MuleTrains Routing Configurations.”
- Developer Name: Salesforce will automatically populate “MuleTrains_Routing_Configurations.”
- Overflow Assignee-Queue: Select “MuleTrains Queue” from the dropdown. Note: An overflow situation occurs when no agents are available.
- Save: Click “Save.”
Fine-Tuning Routing Settings
To further optimize the routing process, we’ll configure the following routing settings.
Configuration Steps (within the Routing Configuration):
- Edit Routing Configuration: Open the “MuleTrains Routing Configurations” you just created.
- Edit Routing Details: Click “Edit” on the Routing Details section.
- Configure Routing Settings:
- Routing Priority: Set to “1.” This assigns the highest priority to sessions routed through this configuration, ensuring they are addressed first.
- Routing Mode: Select “Most Available.” This mode routes sessions to the agent with the most available capacity, balancing the workload and preventing agent overload.
- Capacity Type: Select “Inherited.” This setting allows the routing configuration to inherit capacity settings from higher level configurations.
- Work Item Size-Units of Capacity: Enter “2.00.” This setting specifies that each Messaging Session will consume 2 units of agent capacity. This enables administrators to control how many sessions each agent can handle concurrently.
- Save: Click “Save.”

Creating an Omni-Channel Flow
An Omni-Channel flow is crucial for directing incoming messages to the appropriate Agentforce Service Agent. This flow acts as a decision-making engine, ensuring customer requests are routed efficiently. Later, this flow will connect to your Messaging channel. It will establish a direct link between customer inquiries and your support team.
Configuration Steps:
- Navigate to Flows: In Salesforce Setup, search for and select “Flows.”
- Create a New Flow: Click “New Flow.”
- Select Omni-Channel Flow: Select “Omni-Channel Flow,” and click “Create.”
- Create a Resource Variable:
- Create a New Resource.
- Resource Type: Variable.
- Data Type: Text.
- Availability Outside the Flow: Check “Available for Input.”
- API Name: recordId.
- Click “Done.”
- Create a Route Work Element:
- Drag and drop the “Route Work” element onto the canvas. Note: This element directs the work item to the correct agent.
- Record ID Variable: Select “recordId.”
- Service Channel: Select “Messaging.”
- Route To: Select “Agentforce Service Agent.”
- Agentforce Service Agent: Select your Agentforce Service Agent (e.g., “Mule Trains Demo”). (Ensure this Agentforce Service Agent is created prior to this step.)
- Fallback Queue ID: Select “MuleTrains Queue” (or your created queue).
- Click “Done.”
- Save and Activate: Save your flow with a descriptive name and activate it.

Connecting the Omni-Channel Flow to the Messaging Channel
- Deactivate Agent:
- Navigate to Agents and select the desired agent.
- Ensure the agent is in a deactivated state. Note: The agent must be deactivated before connecting the omni-channel flow.
- Configure Connection:
- Click on Connections.
- Choose your omni-channel flow.
- Edit Channel and Routing:
- Edit Channel: Edit the channel.
- Routing: Find the section for routing and assign the created omni-channel flow to the channel.
- Save: Save the channel.
- Activate Agent:
- Navigate to Agents and select the desired agent.
- activate agent.

Deploying the Messaging Channel
Once the channel, routing configurations, and Omni-Channel flow are set up, you can deploy it on your website. Salesforce provides code snippets that you can embed into your web pages. This will enable visitors to initiate messaging sessions directly from your site.
Creating the Customer Interface (Deployment)
- Navigate to Embedded Service Deployments:
- In Salesforce Setup, use the Quick Find box to search for “Embedded Service Deployments.”
- Select “Embedded Service Deployments.”
- Create a New Deployment:
- Click “New.”
- Select “Messaging for In-App and Web.”
- Choose the platform: “Web,” “Mobile,” or “Custom UI.” For this example, select “Web.”
- Enter a “Deployment Name.”
- Connect the deployment to your Salesforce domain/ custom domain and the messaging channel you created earlier.
- Customize the deployment as needed: Business hours, supported languages, branding (logos, colors, fonts).
- Click “Save.”
- Publish the Deployment:
- Click “Publish.”

Adding the Embedded Messaging Component to Your Site
- Open Experience Site Builder:
- Open your Experience site in the Experience Site Builder.
- Add the Embedded Messaging Component:
- From the Experience Builder Components list, find the “Embedded Messaging” component. Note: This component displays the chat button on your website.
- Drag the component onto the footer of your site template.
- Configure the Component:
- Click on the “Embedded Messaging” component to highlight it.
- Use the Property Editor to configure the component’s settings (e.g., deployment selection).
- Publish the Site:
- Click “Publish” to publish your Experience site.

Configuring CORS (Cross-Origin Resource Sharing)
- Retrieve Site Domain:
- In Salesforce Setup, search for “Digital Experiences” in the Quick Find box.
- Select “Settings.”
- Copy the URL from the “Domain” section.
- Navigate to CORS Settings:
- In Salesforce Setup, search for “CORS” in the Quick Find box.
- Select “CORS.”
- Add a New CORS Origin:
- Click “New.”
- Paste the copied site URL into the “Origin URL Pattern” field.
- Add the https:// protocol to the beginning of the URL (e.g., https://yourdomain.my.site.com).
- Click “Save.”
Testing the Messaging Functionality
- Visit Your Site:
- Go to your Experience site URL.
- Initiate a Conversation:
- You should see the chat button on your site.
- Click the chat button to start a conversation as an end user.

Important Considerations:
- Flow Creation: The instructions mention adding a flow to the Omni-Channel routing. You will need to create a flow that determines how incoming messages are routed. This usually involves checking for specific criteria and assigning the conversation to the appropriate agent or queue.
- Permissions: Ensure that users and agents have the necessary permissions. They need these to access and use Messaging for In-App and Web.
- Testing: Thoroughly test the messaging functionality from both the end-user and agent perspectives.
- Full Setup Guide: The instructions mention a “complete setup guide.” Refer to the official Salesforce documentation for a more detailed and comprehensive setup process.
Benefits of the MuleTrains Queue, Routing, and Omni-Channel Flow
By implementing the “MuleTrains Queue,” fine-tuned routing configurations, and an Omni-Channel flow, you can:
- Ensure no messaging sessions are lost.
- Optimize agent workload distribution.
- Improve response times and customer satisfaction.
- Route messages directly to the most appropriate agent.
- Provide a better overall service.
Conclusion
With these comprehensive steps, you can quickly deploy basic messaging on your website. You can then enhance it with the robust “MuleTrains Queue,” sophisticated routing configurations, and a powerful Omni-Channel flow. This will empower your service agents to provide exceptional support, ultimately boosting customer loyalty and satisfaction.
