Integrate Einstein Bot with Facebook Messenger Channel

Einstein for Service is a powerful set of features to support your agents and satisfy your customers. Using Einstein Bots can greatly reduce the time efforts made to resolve the customers queries. Since Bots are the virtual agents acting towards the customer complaints or grievances, they are trained in a manner to listen to customer's queries and act on some pre-defined rules. If you want to know more on how to use/create Einstein Bots and Chat deployment, visit the Einstein for Service module of Salesforce help documentation or Einstein Bots Developer Cookbook from Salesforce developer documentation.

There are different channels where we can host Einstein Bot. To name a few of them are:

  1. Chat
  2. Facebook
  3. Whatsapp
  4. SMS/Text, etc

While Chat channel is the most used channel for automated chat processes globally, you can give your customers new ways to contact your business. 

Messaging helps customers faster by communicating with them over their preferred messaging channels. Customers can start conversations with your company by sending texts to your designated phone number, Facebook Messenger messages to your Facebook page, or WhatsApp messages to your WhatsApp account. Agents respond to incoming messages or start conversations with customers directly from the service console.

Set up at least one Messaging channel using a simple guided setup flow. You can create up to 2000 channels. Facebook channel can help companies to interact with customers on social platform Facebook. Facebook channel let customers communicate with support agents using Facebook Messenger. Customers use Facebook Messenger to send messages to your company’s Facebook page, and agents can reply from the Service Console.

Pre-requisites:

      • Available in Lightning Experience with the Digital Engagement add-on SKU(Digital Engagement Product License also known as Messaging User)
      • Available in Enterprise, Unlimited, and Developer editions with Service Cloud or Sales Cloud
      • Omni-Channel must be enabled and configured for Messaging

      Steps:

          1. Create Permission Set
            • Name: Configure Messaging Channel
            • App Permissions:
              • Agent Initiated Outbound Messaging
              • Configure Messaging
              • End Messaging Session
              • Messaging Agent
              • Send One-to-Many Messages
            • Object Permissions:
              • Messaging Session
              • Messaging User
          2. Create Routing Configuration Facebook Messenger POC
          3. Create Queue Facebook Messenger POC with Routing Configuration created above and add users in that queue
          4. Add Service Channel Messaging in Presence Status
          5. Assign Users
            • Permission Set License Assignment - Messaging User
            • Permission Set - Configure Messaging Channel
          Till now we have covered all the required set up to use the Messaging Setting and creating Facebook Messenger channel. New let's see how we can set up a Facebook Messenger Channel.

          Create Facebook Messenger Channel: 

          In this section, we will see how we can create new Facebook Messenger Channel(Bot Testing in our example). Follow below steps:

          1. Create a Facebook Account and Facebook Page.
          2. From Setup in Lightning Experience, enter Messaging in the Quick Find box, and select Messaging Settings.
          3. In the Channels section, click New Channel.
          4. Click Facebook Messenger.
          5. Click Start.
          6. Click Authenticate Facebook.
          7. Select the Facebook page to use with Messaging. You can select only one Facebook page in this setup flow. To set up more Facebook pages, repeat the flow.
          8. Click Next.
          9. In the Chat Acknowledgement field, enter a message that’s sent in response to the customer’s initial text message. The Chat Acknowledgement response assures your customer that your company received their text.
          10. Click Next.
          11. Select whether to set up Omni-Channel to route messages to agents. Select Create a new queue and routing configuration, or select Stop the setup flow and manually connect to an existing queue and routing configuration. 
            • If you select Create a new queue..., the flow takes you though the steps to:
              • Create a queue.
              • Create a routing configuration.
              • Adjust the agent messaging workload.
              • Click Done.
            • If you select Stop the setup flow..., the flow ends.
              • Click Done.
          12. To close the setup flow, click Finish.
          13. Your Facebook Messenger channel appears in the Messaging channels list view.
          14. Check out my Video(Also available on YouTube) attached in this blog on setting up the Facebook Messenger Channel.
          15. Add the newly created Bot Testing Facebook Messenger Channel on our Einstein Bot Connection.
            • Go to Setup → Einstein Bot 
            • Open the Active Einstein Bot from the available list.
            • Click on Overview and add the Connection there.
          If you selected Stop the setup flow..., you must connect the channel to a queue and routing configuration. Otherwise, messages aren’t routed to agents. From Setup in Lightning Experience, enter Messaging in the Quick Find box, and select Messaging Settings. In the channels list view, select the Facebook Messenger channel and click Edit. Select a queue and routing configuration, and click Save.

          Demo:

          Congratulation !!

          We are done with all the required set up for enabling the Messaging and setting up Facebook Messenger Channel, it's time to test our very own first Bot Testing Facebook Messenger Channel on our Facebook Page. 

          As we have also integrated our newly created Facebook Channel on our Einstein Bot, let's do some setting in our Facebook Page to invoke this Bot. Follow the steps mentioned below:

          1. Login to your Facebook Account.
          2. Open you Facebook Page.
          3. Click on Add a button
          4. Select Send Message
          5. Click Save.
          6. Click on Edit Send Message button and choose Test Button.
          7. Cool!!, all done and you are all set to test your Einstein Bot with Facebook Messenger Channel on your very own Bot Testing Facebook Page. Just say 'Hi' or any thing greeting keyword and you will get response for acknowledgement. You can start conversation with the virtual chat agent(Inevitable Yogendra in our Example). You may also talk to live agent if you choose an option for Transfer to live agent from the suggestions in the Messenger chat session.
          8. Play the video below and see all possible actions in reality.
          Note: To end the conversation, just type one of the following keywords and the chat will be closed/ended.
          stopall,cancel,stop,unsubscribe,end,quit

          Comments

          1. I've just decided to create a blog, which I have been wanting to do for a while. Thanks for this post, it's really useful! captcha app

            ReplyDelete
          2. This is a fantastic guide on integrating Einstein Bot with the Facebook Messenger channel! It’s impressive how Salesforce continues to bridge the gap between AI and customer engagement. As a chatbot development company in USA, we often use tools like Salesforce Einstein Analytics to analyze and optimize bot performance across various channels. Thanks for sharing such a practical and informative resource!

            ReplyDelete

          Post a Comment