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 NameEnvironment Variable NameDescription
sfdc.einstein.bots.runtime-urlBOT_RUNTIME_URLRequired. The base URL of the bot runtime.
sfdc.einstein.bots.integration-nameBOT_INTEGRATION_NAMEThe 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-fileOAUTH_PRIVATE_KEY_FILE_PATHRequired. The path to the private key in DER encoded format to get OAuth tokens.
sfdc.einstein.bots.oauth.login-endpointLOGIN_END_POINTRequired. 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-idCONNECTED_APP_IDRequired. The consumer key of your connector app setup.
sfdc.einstein.bots.oauth.connected-app-secretCONNECTED_APP_SECRETRequired. The consumer secret of your connector app setup.
sfdc.einstein.bots.oauth.user-idSFDC_USER_IDRequired. The login user ID that you use to log in to Salesforce.
sfdc.einstein.bots.cache.ttlsecondsCACHE_TTL_SECSThe time in seconds to cache information for tracking sessions. Provide a value appropriate to your external channel.
sfdc.einstein.bots.cache.redis-urlCACHE_REDIS_URLThe Redis URL. Required to use the Redis cache.
sfdc.einstein.bots.oauth.cache.ttlsecondsOAUTH_CACHE_TTL_SECSThe time in seconds to cache oauth tokens to avoid network requests.
sfdc.einstein.bots.oauth.cache.redis-urlOAUTH_CACHE_REDIS_URLThe 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.