Assign a conversation based on the Salesforce account owner
Edited

Overview

This is by far the hottest topic you've asked, regarding Salesforce auto-assignments in Front, which is why we're excited to let you know-- yes, it's possible! 🎉 

Just follow the steps below for either option and you'll be able to implement smart assignments in no time.


Option 1: Zapier Assignment Method

Permissions required

  • Be able to create a shared rule in Front

  • Be able to create a custom field in Salesforce

  • Be able to create a Zap in Zapier 

Instructions

Part 1: Start in Salesforce

Step 1

Go to Setup. Create a custom field in your Contacts object (Build > Customize > Contacts > Fields > Create New Field).

Step 2

Data Type = Formula

Step 3

Name field (Account_owner_email) and select Text

Step 4

In the text box type Account.Owner.Email

Step 5

Go through the remaining steps and save.

Part 2: Create your Zapier trigger

Step 1

Create a new Zap.

Step 2

Choose the Webhooks Trigger > Catch Hook

Step 3

Copy the webhook URL.

Part 3: Create your routing rule in Front

Step 1

Create a new rule and select your desired When and If conditions.

Step 2

For your Then condition choose Send to a Webhook, and paste the copied webhook URL from Zapier.

Step 3

In order for Zapier to have an email to work with, you'll need the rule to trigger. You can either send an email yourself or wait for a client email to come through. Once a customer email comes through, you can go back to Zapier.

Part 4: Complete your Zapier trigger

Now that you have a conversation to work with, you can complete the rest of your first Zapier trigger, just go through the rest of the steps.

Part 5: Zapier action - Salesforce Search

Step 1

Choose Salesforce, and click Find a contact, then connect to your Salesforce account.

Step 2

In the Field to Search By, select Email.

Step 3

In Search Value, select Conversation Recipient Handle.

Step 4

Test your step and continue.

Part 6: Zapier action - Custom Request

Step 1

You'll want to again select Webhooks, and then Custom Request.

Step 2

For Method, select PATCH from the dropdown menu.

Step 3

For URL, paste https://api2.frontapp.com/conversations/ and at the end of the URL add, from the drop-down, conversation id from Catch Hook.

Step 4

In Data, paste { "assignee_id": "alt:email:" }. You'll need to then add the Custom Field you created in Salesforce into your formula, right after alt:email: This will reference the email address of the account owner in Salesforce and assign that conversation to the Front user with the matching email address.

Step 5

In Headers, add the following:  

For your authorization token, you will need to generate an API token in your Front API settings. Open your API settings, click Create API token, and create a token for this Zap with the Shared resources scope. Copy that token and paste it after the text Bearer.

Step 6

Test the step.

What's next?

Now that you've set up your rule and Zap, Front will automatically assign your conversations based on the account owner in Salesforce. 


Option 2: Front Assignment Based on Custom Contact Field

What's required

Instructions 

Part 1: Create the custom field

Step 1

Create a custom contact field in Front by following the steps here. For data type, choose Teammate.

Step 2

Sync data from Salesforce to this custom field. For testing purposes, you can manually update this field in the contact manager. We expect the value of this field to be the email address of a Front teammate.

Part 2: Create a contact assignment rule

Step 1

Create a rule with your desired When and If conditions.

Step 2

For your Then condition, use Assign Based on a contact field, and choose the contact field you created.