# Set Up the Bring Your Own Bot Demo Connector

To verify your Bring Your Own Bot (BYOB) configuration is ready for end-to-end testing, set up the interactive Salesforce BYOB Demo simulator to test external bot messaging integration with Messaging End Users (MEUs).

The demo connector allows you to:

- Test external bot messages through the Interaction Service.
- Manage bot agent work requests by accepting or declining them when end users send messages.
- Simulate complete bot-to-MEU conversation flows.

The connector constructs Interaction API request payloads using your External Conversation Participant Integration Definition and sends requests to the Interaction Service for bot message handling.

## Before You Begin

Before setting up the BYOB demo connector, make sure that you:

- Configure an [`ExtConvParticipantIntegDef` record](/docs/service/messaging-byob/guide/create-entity-records.md#create-the-extconvparticipantintegdef-record) in your Salesforce org with the associated [`ExternalConversationBotDef` record](/docs/service/messaging-byob/guide/create-entity-records.md#create-the-externalconversationbotdef-record).
- Set up an [External Client App with JWT authentication](/docs/service/messaging-byob/guide/create-external-client-app.md).
- Configure [Omni-Channel routing](/docs/service/messaging-byob/guide/configure-flow-routework.md) with appropriate queue settings.
- Install Node.js, NPM, and `webpack-dev-server` in your development environment.

## Configuration and Installation

Use the sample implementation in GitHub to set up the BYOB demo connector: [github.com/salesforce-misc/byo-demo-connector](https://github.com/salesforce-misc/byo-demo-connector).

1. Clone the repository and install the required dependencies using `npm`.
2. Copy the provided `config.env` template to create your `.env` file.
3. Configure your `.env` with your Salesforce org credentials, External Client App details, and BYOB-specific settings. Key configuration elements include:
   - The API Name of your `ExtConvParticipantIntegDef` record.
   - The Salesforce record ID of your `ExternalConversationBotDef` record.
   - The Omni-Channel queue ID for routing bot conversations.
4. For sandbox environments, update the authentication endpoints and audience URLs accordingly.
5. Start the application using `npm start`. The web server runs on `https://localhost:8080` by default.
6. Access the BYOB testing interface at `https://localhost:8080/byob`.

:::note
If you encounter SSL certificate warnings during local development, you can proceed through the browser warning or set up a self-signed SSL certificate.
:::

:::note
The demo connector is intended as a reference example only. Create your own connector for your integration before using it in production.
:::

## Next Steps

After you set up the demo connector, [test the Interaction Service APIs](/docs/service/messaging-byob/guide/test-byob-apis.md).
