Salesforce Integration: Mapping “Record Owner” Field Data when Leads are Assigned to Queues

In my previous article, I explained how you can map data from the “record owner” field to a custom field in the lead or contact object. However, that formula applies when your contact or lead records are assigned to Salesforce users in your org. But what happens if your leads are assigned to queues?

Let’s first define what queues are and how they are used in Salesforce. Queues in Salesforce are created to help groups of users manage certain record types, usually leads or cases. With leads, as an example, you will be able to assign them to different queues based on geographies or functional groups within your organization.

In cases where records such as leads are assigned to queues instead of users, you just need to make sure that you use “Queue ID”/”Queue Name” pairs instead of the “User ID”/”User Name”. The remainder of the formula syntax including the primary field name (i.e. OwnerID) stays the same. Here is an example:

CASE (OwnerId, “00G30000000gnie”, “Eastern Region”, “00G30000000dfil”, “Central Region”, “00G30000000jfir”, “Western Region”, “None”)

Unfortunately, there is not simple way of generating those Queue IDs at one shot like you can with User IDs using Salesforce administrative reports. The only way to expose Queue IDs is by selecting Queues under Setup>Administration Setup> Manager Users>Queues and copying the IDs from the URL in your browser’s address field. Here is an example of what the URL looks like:


To see how you can get to the formula creation step, please refer to my previous blog article for a detailed walk through. Also note that for integration purposes with BlastWizard, you can only create the above custom field in the “lead” object since the contacts do not support queues.