---
schema_version: "1"
id: 27543fca6609407352f3e4de15542da1d9de103ff5b1ca0d5260ed727086c6e9
title: Create a Sample Einstein Bot
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-partner/guides/create-einstein-bot.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-partner/guide/create-einstein-bot.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 351c311b5810420cee1009f96a0e90e7f8acbd6d16849aa5e35d8a0957877d45
products:
  - Bring Your Own Channel for Messaging
  - Service Cloud Developer Content
---
# Create a Sample Einstein Bot

To help your customers efficiently set up an Einstein Bot with Bring Your Own Channel for Messaging, create a sample Einstein Bot and associated Omni-Channel Flows and include them in your managed package.

In this example, we create an outbound Omni-Channnel Flow that routes from a bot to a rep. We then set up a sample Einstein Bot that uses this outbound flow and automatically generates a corresponding inbound flow that sends conversations to the bot. For your package, we recommend creating a flow and bot configuration that reflects the expected business logic of your customers.

## Create a Flow

Follow steps in Salesforce Help to create an Omni-Channel flow to [Route Work Items to a Specific Agent](https://help.salesforce.com/s/articleView?id=service.omnichannel_route_to_specific_agent.htm). This sample outbound flow transfers the Messaging end user from an Einstein Bot to a rep.

You need this flow to select it as the **Outbound Omni-Channel Flow** during Einstein Bot setup.

## Create an Einstein Bot

1. From Setup, in the Quick Find box, enter `Einstein Bots`, and then select **Einstein Bots**.
2. Enable Einstein Bots if it’s not already enabled.
3. Launch the guided setup from the Einstein Bots main page. For your first bot, click **Create a New Bot**. Otherwise, click **New**.
4. Select **Enhanced Bot**, and then click **Next**.
5. To create an Einstein bot from scratch, select **Start from Scratch**, and then click **Next**.
6. Personalize your sample bot.
   - Enter a bot name, select a primary language, and then click **Next**.
   - Modify the welcome message, but don’t customize the menu items. Your customers adjust them when they clone your sample Einstein Bot. When you’re done, click **Next**.
7. On the Link to deployment page of the guided setup, select **Create an inbound Omni-Channel flow for my bot**, and then from **Outbound Omni-Channel Flow** dropdown, select the flow that you created.
8. Click **Proceed** to start the bot creation process, and then click **Finish** to confirm when it’s done.

When the system has finished creating the bot, Einstein Bot Builder opens.

### Configure the Einstein Bot

Configure the Einstein Bot to trigger the sample flow that transfers a Messaging session from the bot to a rep.

1. If you aren’t already in Einstein Bot Builder, from Setup, enter `Einstein Bots` in the Quick Find box, and then select **Einstein Bots**. In the My Bots section, select the name of the bot that you created.
2. In Einstein Bot Builder, from the Bot Builder menu, click **Dialogs**.
3. In the Dialogs panel, click **New**.
4. Give the dialog a name, such as `Get help from a representative`. Enter an API name and optional description, and save.
5. In the Dialogs panel, select the newly created dialog.
6. Click **Next Step**. From the Step Properties panel, select **Transfer to an agent**.
   ![Dialog with Transfer to an agent selected as Next Step](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-einstein-bot-get-help-from-agent-dialog.png '{"class": "image-lg"}')
7. Save the dialog.
8. In the Dialogs panel, select **Main Menu**.
9. Click **Next Step**. From the Step Properties panel, select **Show a menu** and add the `Get help from a representative` dialog you created previously as one of the menu items.
   ![Main Menu Dialog with Get help from a representative included as a menu item](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-einstein-bot-main-menu-dialog.png '{"class": "image-lg"}')
10. Save your work.

## Include the Sample Einstein Bot and Flows in Your Managed Package

When you [create the managed package](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-managed-package.md) for your integration, add these components to the managed package.

- The sample Einstein Bot that you created
- The sample Omni-Channel outbound flow that you created
- The inbound Omni-Channel flow that the system automatically created

**See Also**

- _Salesforce Help_: [Set Up an Einstein Bot for Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.byoc_ccaas_einstein_bot.htm)
- _Salesforce Help_: [Route Conversations to and from Your Enhanced Bot](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_route.htm)
- _Salesforce Help_: [Add a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_new_dialog.htm)
- _Salesforce Help_: [Set Up a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_new_dialog.htm)
