Feedback

  • Contents
 

Format Salesforce URL for new record screen pop

        On this page Hide

This article describes how to format the value of a SF_URLPop custom call attribute to screen pop a new record in Salesforce, pre-populated with caller data. This example uses a Salesforce New Contact, but you can use this same approach to screen pop and pre-populate literally any Salesforce record.

Warning! The technique described in this article is based on the URL format used in Salesforce’s standard (Classic or Console) user interface. This URL format is not an API that Salesforce officially supports and is subject to change. Also, the URL format described in the following examples is not compatible with Salesforce’s Lightning Experience.

Identify the URL

Each record in Salesforce uses an exact URL code. Creating a contact results in this URL: https://na5.salesforce.com/003/e. The 003 is a three-character code for contacts. The e identifies the contact as a new record.

The first portion of the URL (https://na5.salesforce.com) could look different in your environment. The value of a custom call attribute only needs the portion that follows the main URL, for example, 003/e.

Note:

When using “SF_UrlPop” the value may be the full Salesforce URL of the page. Use only the part after https://<lightning.domain.com>/ in the URL, or the Salesforce Object ID.

For more information about Lighting URL structure, see the:

Fill out new record data

Once you have identified the URL for a new contact, you can define the fields that you want to pre-fill with data. To get the exact field names from Salesforce, use the developer tools in your browser. These steps use developer tools to identify the First Name and Last Name field names. In this example, the exact field names are name_firstcon2 and name_lastcon2.

  1. To display the HTML code for the New Contact page, right-click the webpage, and then click View Source or View Page Source.

  2. Find the exact field names by searching for the exact label text from the New Contact record, in this case First Name and Last Name.

    <label for="name_firstcon2">First Name</label>

    <label for="name_lastcon2">Last Name</label>

Format the URL

Create the URL by combining the relative URL with the field names and values, as described in this table.

Format element

Description

<object code>/

Relative URL of the Salesforce object to screen pop.

e?

e indicates a new record; ? indicates that pre-filled values follow in the URL.

<field name X>=
<field value X>

Zero to many fields with prefilled values can be sent on the URL. Delimit each field name/value pair with an ampersand (&). This portion of the URL must be HTML-encoded. You can use the Escape URL handler tool step to escape this portion of the string.

 

object code>/e?<field name 1>=<field value 1>&<field name 2>=<field value 2>

Example

The URL in this example would be: 003/e?name_firstcon2=John&name_lastcon2=Wilson

Note: This example uses Interaction Attendant to set the attribute. The information used to set the attribute on the call can come from multiple different places: data dip, caller data entry, workgroup information, a static URL, or a combination of other interaction attributes. For more information, see the Interaction Attendant documentation in the PureConnect Documentation Library.

  1. Create a new profile in Interaction Attendant.

  2. Add a Set Attribute operation to the profile.

  3. Set the Attribute to SF_URLPop.

  4. Set the Value to a relative link for the Salesforce page that displays when an incoming interaction contains this custom attribute. In this example, the value is a new contact URL, appended with input data, 003/e?name_firstcon2=John&name_lastcon2=Wilson.

  5. Publish this configuration.

    When a call comes to this profile, Interaction Attendant assigns the value of 003/e?name_firstcon2=John&name_lastcon2=Wilson to the custom call attribute SF_URLPop. Once routed to an agent, the alerting call screen pops a Salesforce New Contact record with John Wilson in the First Name and Last Name fields.