---
schema_version: "1"
id: 6fb579d48c471c258f1adfe38f1fb15e8a7a06d44d73c728e58d8a8cc327e8c8
title: Get Started
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/bot-api/einstein-bot/guides/channel-connector/connector-get-started.md
canonical_url: https://developer.salesforce.com/docs/service/einstein-bot-api/guide/connector-get-started.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 79f23ab92772098dfca04f6ca50cfc029432d0c5efeec691188e4c0f2d95a215
products:
  - Einstein Bots API and SDK
  - Enstein Bot API and SDK
---
# Get Started

Learn how to get started with the Einstein Bot channel connector framework to send messages between your external messaging channel, such as Twitter or Slack, and the Salesforce bot.

## Create a Channel Connector App

You can create an app that uses the channel connector framework with this Maven archetype command. Set `archetypeVersion` to the most recently released version of the [Einstein Bot Channel Connector Archetype](https://mvnrepository.com/artifact/com.salesforce.einsteinbot/einstein-bot-channel-connector-archetype). Set `package`, `groupId`, and `artifactId` to the names of your choice.

```java
mvn archetype:generate \
    -DarchetypeGroupId=com.salesforce.einsteinbot \
    -DarchetypeArtifactId=einstein-bot-channel-connector-archetype \
    -DarchetypeVersion=1.0.1 -Dpackage=com.mycompany.myapp.channel \
    -DgroupId=com.mycompany.myapp -DartifactId=myapp-channel-connector \
    -Dversion=1.0.0-SNAPSHOT
```

Alternatively, you can use this command to run it in interactive mode and provide the `groupId` and `artifactId` when prompted.

```java
mvn archetype:generate \
    -DarchetypeGroupId=com.salesforce.einsteinbot \
    -DarchetypeArtifactId=einstein-bot-channel-connector-archetype \
    -DarchetypeVersion=2.0.1
```

## Run the Channel Connector App

First, configure the `src/main/resources/application.properties` file. You can start by copying the example properties from the `src/main/resources/application.example.properties` file.

This table lists the available application properties.

| Property Name                                   | Environment Variable Name     | Description                                                                                                                                                            |
| ----------------------------------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sfdc.einstein.bots.runtime-url`                | `BOT_RUNTIME_URL`             | Required. The base URL of the bot runtime.                                                                                                                             |
| `sfdc.einstein.bots.integration-name`           | `BOT_INTEGRATION_NAME`        | The integration name that you used when connecting the connected app API to the bot. See [Get Started with Einstein Bots API](https://developer.salesforce.com/docs/service/einstein-bot-api/prerequisites.md).                    |
| `sfdc.einstein.bots.oauth.private-key-file`     | `OAUTH_PRIVATE_KEY_FILE_PATH` | Required. The path to the private key in DER encoded format to get OAuth tokens.                                                                                       |
| `sfdc.einstein.bots.oauth.login-endpoint`       | `LOGIN_END_POINT`             | Required. The Salesforce URL to get the OAuth Token. This is `https://login.salesforce.com` for the production org and `https://test.salesforce.com` for the test org. |
| `sfdc.einstein.bots.oauth.connected-app-id`     | `CONNECTED_APP_ID`            | Required. The consumer key of your [connector app setup](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_terminology.htm&type=5).                         |
| `sfdc.einstein.bots.oauth.connected-app-secret` | `CONNECTED_APP_SECRET`        | Required. The consumer secret of your [connector app setup](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_terminology.htm&type=5).                      |
| `sfdc.einstein.bots.oauth.user-id`              | `SFDC_USER_ID`                | Required. The login user ID that you use to log in to Salesforce.                                                                                                      |
| `sfdc.einstein.bots.cache.ttlseconds`           | `CACHE_TTL_SECS`              | The time in seconds to cache information for tracking sessions. Provide a value appropriate to your external channel.                                                  |
| `sfdc.einstein.bots.cache.redis-url`            | `CACHE_REDIS_URL`             | The Redis URL. Required to use the Redis cache.                                                                                                                        |
| `sfdc.einstein.bots.oauth.cache.ttlseconds`     | `OAUTH_CACHE_TTL_SECS`        | The time in seconds to cache oauth tokens to avoid network requests.                                                                                                   |
| `sfdc.einstein.bots.oauth.cache.redis-url`      | `OAUTH_CACHE_REDIS_URL`       | The Redis URL. Required to use Redis for caching OAuth tokens.                                                                                                         |

Start the app by running Spring Boot with this Maven command.

```bash
mvn spring-boot:run
```

## Use the Default Spring Bean

Use `@Autowired` or `@Inject` in your Spring-managed code to use Bean with the default configuration.

```java
@Autowired
private BasicChatbotClient basicChatbotClient;

@Autowired
private SessionManagedChatbotClient sessionManagedChatbotClient;

@Autowired
private BotsHealthIndicator health;

```

Now, let’s [Explore Example Channel Connector Apps](https://developer.salesforce.com/docs/service/einstein-bot-api/guide/connector-explore-examples.md) to build your connector app.
