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.
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. Set package
, groupId
, and artifactId
to the names of your choice.
Alternatively, you can use this command to run it in interactive mode and provide the groupId
and artifactId
when prompted.
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. |
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. |
sfdc.einstein.bots.oauth.connected-app-secret | CONNECTED_APP_SECRET | Required. The consumer secret of your connector app setup. |
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.
Use @Autowired
or @Inject
in your Spring-managed code to use Bean with the default configuration.
Now, let’s Explore Example Channel Connector Apps to build your connector app.