| 
singapore-business-database

Salesforce Integration: Mapping “Record Owner” Field to a Custom Contact or Lead Field

On BlastWizard integration with Salesforce, I have previously written a blog article about how you can automate the mapping between an existing “account” field and a custom field created in the “contact” record to be used in list segmentation and data merging. While mapping from the “account” object in Salesforce was pretty straight forward using the formula field as explain in my article, doing the same from the “user” object is quite a different story. This workaround in Salesforce is best suited for field that have a finite data range. One of the most requested fields for mapping to a custom contact or lead field is the record (lead/contact) owner.

Here are the steps on how to map standard ‘contact owner’ field and its values to a new custom field in the contact object:

  1. Click the Reports tab in Salesforce then click on the All Active Users report under Administrative Reports. This will generate the standard version of the report.
  2. Click the Customize button and select both Full Name and User ID fields from the list under User Information.
  3. Use the Jump to Step dropdown to go to Select Criteria and run report. You can then either copy/paste or export the report content in one of the spreadsheet formats. You are going to use the Full Name/User ID data pair in the formula explained below.
  4. From the top right of your Salesforce screen, click on Setup.
  5. Under App Setup in the left-side menu, click on Customize | Contacts | Fields.
  6. Scroll down to the Contact Custom Fields & Relationships section, and click on New to create a custom field.
  7. On the next screen, Step 1, select your field data type as formula then click Next.
  8. Under Step 2, type in your Field Label (e.g. Record Owner), then select Text for Formula Return Type. Click Next to continue.
  9. Select Advanced Formula in step 3, then click inside the text box to start typing your formula.
  10. Select the Case function from the box on the right, then click on Insert Selected function button. The following syntax will appear in the text box:
  11.         CASE(expression, value1, result1, value2, result2,…,else_result)

  12. Replace the following parts in the syntax with the Full Name/User ID data pair as follows:
  13.         Experssion = OwnerID
            Value1 = User ID 1
            Result1 = Full Name 1
            Value1 = User ID 2
            Result1 = Full Name 2
            …
            …
            Else_result = None

    You will need to wrap your all values with double quotes. Your final formula will look something like this:

    CASE (OwnerId, “005500000018ucQ”, “Brian Edwards”, “00520000091isu0″, “John Smith”, “00550000003PfeV”, “Thomas Leonard”, “None”)

  14. In step 4, you may edit Field Level Security if you wish. Click Next to go to the last step.
  15. Select the page layouts that should include this field, then Click Save to complete.

Once the custom field is set up, click on the BlastWizard for AppExchange tab and go to ‘Campaign Wizard’ to schedule a job. Select Segment All Contact in Step 2, then select the newly created Record Owner field to filter contacts belonging to one or more of yoru sales reps, i.e. record owners.