Assign a conversation based on the Salesforce account owner

Edited

Overview

Implement Salesforce auto-assignments using Front rules + Zapier or Front rules + contact custom fields.


Option 1: Zapier assignment method

Prerequisites (for option 1)

  • 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 (for option 1)

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

Select 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 triggers and If conditions.

Step 2

For your Then action, select Send to 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

Prerequisites (for option 2)

A method to sync contact information between Salesforce and Front. This could be done through a Front integration partner or using Front's API. See Synchronizing and Leveraging Salesforce Data in Front via Rules.

Instructions (for option 2)

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 triggers and If conditions.

Step 2

For your Then action, use Assign based on a contact custom field, and choose the contact field you created.

Step 3

Click Create to finish your rule.


Pricing

These features are available on the Growth plan or above.