Skip to main content
Register now for TDX! Join the must-attend event to experience what’s next and learn how to build it.

Integrate Slack with CRM

Operate with Trust and Security

Slackbot operates under strict security standards and respects the running user’s existing Salesforce permissions. It only surfaces CRM data the user is authorized to view. To establish this secure connection, you add the Agentforce Sales and Agentforce Service apps to Slack and authenticate your user account.

Note

Do You Already Have a Slack Playground?

To complete this badge, you need to have a Slack Playground provisioned from Trailhead. If you don’t have a Slack Playground yet, proceed to the section, Retrieve Your Trailhead Slack Playground.

If you already have a Slack Playground, scroll to the bottom of the page, and launch your playground from the Hands-on Challenge section.

  1. From the dropdown, select your email address.
  2. Click Connect Slack Playground.
  3. Then click Launch.
  4. Your Slack Playground is ready!
  5. Now complete the section, Request a Connection to Salesforce.

Retrieve Your Trailhead Slack Playground

Trailhead is integrated with the Slack Developer Program. This enables us to provide you with a special Slack Playground designed for hands-on learning. When you connect your Trailhead account to Slack for the first time, you’re signed up for the Slack Developer Program, which gives you access to a wealth of Slack development resources.

It’s time to get your Slack Playground up and running.

  1. Scroll down to the Challenge section of this page, where it says Hands-on Challenge.
  2. By default, your primary Trailhead email address is selected. If you prefer another email address that’s associated with your Trailhead account, click on the email dropdown and select it.
  3. Add a check to the box next to “I accept the Slack Developer Terms of Service.” Optionally, you can check the next box to subscribe to the Slack Developer Newsletter.

Authorization window for Slack Playground with email field, terms checkbox, and Create Slack Playground button.

  1. Click Create Slack Playground. After a moment, your playground is created and the page refreshes.
  2. Scroll back down to the challenge section. Click Launch to open your playground in a new tab.

Connected email account learningfun@gmail.com with Disconnect Slack Playground and Launch buttons.

  1. The first time you open your playground, a terms of service modal appears. Click I Agree.

Your Slack Playground is ready!

Request a Connection to Salesforce

Now you can connect your Salesforce org to Slack. When you request a Salesforce connection in Slack, you can choose how your members’ Slack and Salesforce accounts connect. You have the option to automatically configure member accounts using Email or SAML NameID fields. For this badge, you manually configure user accounts using your admin credentials. Remember the domain URL you retrieved from your CRM org in the previous unit? You use it in this section.

  1. In your Slack Playground, click the down arrow next to your workspace name to view the dropdown menu.

Dropdown arrow next to the workspace name highlighted.

Note: Your workspace name differs from the image.

  1. Navigate to Tools & settings | Manage Salesforce Organizations. This takes you to the Salesforce organizations page.

Manage Salesforce Organizations menu selection.

Note: This opens the Slack admin page in an additional tab. Keep both Slack tabs open.

  1. Click the Connect Salesforce Org button.
  2. Paste the domain URL into the field for Salesforce org to connect.

Note: If you added your domain URL to the form in unit 1, simply copy the text from the element below. After copying your username, click Clear. You no longer need this information.

  1. Uncheck the toggle for Map user accounts automatically. Keep all other options as is.
  2. Click Request Connection. You get a response that the request was sent to the Salesforce admin. That’s you!
  3. Click Okay.

The integration is now underway. Next, you accept the connection on the Salesforce side.

Accept the Connection

Head back to your Trailhead Playground. Once the request to connect has been made in Slack, a Salesforce admin (in this case, you!) can approve it in Salesforce.

  1. Return to your Trailhead Playground tab.
  2. Click setup icon and select Setup.
  3. In the Setup Quick Find, search for and select Manage Slack Connection.
  4. Click the checkbox to the Agree to terms, including the Slack user terms.
  5. Click Approve. The connection page refreshes, and the Waiting for activation by Slack admin status appears.

Manage Slack Connection window with Approved Connection and the Waiting for activation by Slack admin status.

Activate the Connection in Slack

Now it’s time to head back to Slack and finalize the connection. Workspace owners and Salesforce admins can activate a pending Salesforce connection.

  1. Return to the Slack admin tab you have opened from the previous section and refresh the page. Your Salesforce org appears with a Connection status of Ready to activate.

Note: If you closed the Slack admin page tab, open your Slack playground and click Workspace name | Tools & settings | Manage Salesforce organizations to re-open the Slack admin page.

  1. In the Connection status column, click View details.

Slack window open to Salesforce organizations with view details link highlighted.

  1. Click Activate.
  2. In the modal, click Activate.

Stay on this page for the next step.

Add Your Slack User to Salesforce

Next, add your Slack user.

  1. Click the Users tab.
  2. Click Add individually.

In the Salesforce org window under the Users tab, the Add individually link is highlighted.

  1. In the search bar, type you, and select the Slack user with “(you)” at the end.
  2. Click Grant Access to 1 Person.

Under the Users tab, your Slack user is now listed.

Sign Your Slack User into CRM from Slack

The final part of this integration is to sign in using your CRM (Trailhead Playground) org credentials.

  1. Head back to your Slack workspace (the other Slack tab). If you kept the tab open, refresh.
  2. In the navigation, click Sign in to Salesforce.

Slack interface with the Sign in to Salesforce button highlighted.

  1. Click Continue.
  2. Click Continue to Salesforce.
  3. Enter the username for your Trailhead Playground, and paste it into the Salesforce login username.

Note: If you added your Trailhead Playground username to the form in unit 1, simply copy the text from the element below. After copying your username, click Clear. You no longer need this information.

  1. Enter the password you created.
Note

If you accidentally closed the modal, you can always navigate to an alternative sign-in page via your workspace name | Preferences | Salesforce.

  1. Click Login then Allow.
  2. Click Done.

You get a message that you successfully connected your account. You can close the OAuth window. Click back into your Slack workspace, and the modal shows that your org is connected. Now that you have successfully connected your Trailhead Playground to your Slack workspace, it’s time to see Slackbot in action.

Note

Do You Have Multiple CRM Orgs Connected?

You may get an error in the Challenge section of this badge if you have multiple CRM orgs connected to your Slack playground. Make sure you only have the org related to this badge connected.

  1. Click the down arrow next to your workspace name.
  2. Go to the admin dashboard: Click Tools & settings | Manage Salesforce Organizations
  3. Click next to the CRM org you wish to disconnect.
  4. Select Disconnect org.
  5. Then, click Disconnect.
Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios