Updating the Salesforce Schema

Each Janrain user profile attribute copied to Salesforce must have a corresponding Salesforce Contact field. In some cases, a one-to-one correspondence already exists: for example, the Janrain user profile has a birthday attribute, while the Salesforce Contact object has a Birthdate field. In other cases, no such correspondence exists: for example, Salesforce does not have a field equivalent to Janrain's emailVerified field. If you want to keep track of which users have (or have not) verified their Janrain email addresses, you will need to add a new field to the Contact schema.

The following table shows the default mappings between commonly-used Janrain user profile attributes and Salesforce Contact fields. Remember, you do not need to have a Salesforce equivalent for every field in the Janrain profile: you only need to have fields for the attributes you want to copy from Janrain. For example, if you don't need to track email verifications then there's no reason to create an emailVerified field in Salesforce.

Note. What happens if an attribute, like emailVerified, is copied over from Janrain, but there is no matching field on the Salesforce side? Nothing: that value simply doesn't get added to Salesforce. A "missing" field does not cause the rest of the data transfer to fail.

Here are the default mappings:

Janrain User Profile Attribute

Datatype

Salesforce Contact Field

birthday

datetime

Birthdate

created

datetime

None. You must create a custom attribute if you want to maintain this data in Salesforce.

deactivateAccount

datetime

None. You must create a custom attribute if you want to maintain this data in Salesforce.

email

string

Email

emailVerified

datetime

None. You must create a custom attribute if you want to maintain this data in Salesforce.

familyName

string

LastName

gender

string

None. You must create a custom attribute if you want to maintain this data in Salesforce.

givenName

string

FirstName

lastLogin

datetime

None. You must create a custom attribute if you want to maintain this data in Salesforce.

lastUpdated

datetime

None. You must create a custom attribute if you want to maintain this data in Salesforce.

locale

string

None. You must create a custom attribute if you want to maintain this data in Salesforce.

primaryAddress.address1

string

Mailing Address | Street

primaryAddress.city

string

Mailing Address | City

primaryAddress.country

string

Mailing Address | CountryCode

primaryAddress.mobile

string

Mobile

primaryAddress.phone

string

Home Phone

primaryAddress.region

string

None. You must create a custom attribute if you want to maintain this data in Salesforce.

primaryAddress.zip

string

Mailing Address | PostalCode

title

string

None. You must create a custom attribute if you want to maintain this data in Salesforce.

uuid

uuid

None. You must create a custom attribute if you want to maintain this data in Salesforce.

If you need to add a new attribute to the Salesforce Contacts object, you can do so by completing the following procedure. In this example, we'll add an attribute that maps to the Janrain UUID:

  1. From the Salesforce Developer Home page, expand Objects and Fields and then click Object Manager:
  2. On the Object Manager page, click Contact:
  3. On the Contacts page, click Fields & Relationships:
  4. On the Field & Relationships page, click New:
  5. On the New Custom Field page, for Step 1, select the Text data type and then click Next:
  6. For Step 2, enter the name of the new field (for example, Janrain_UUID) in the Field Label field:
  7. In the Length field, type 32, meaning that the field can contain no more than 32 characters:
  8. Select Do not allow duplicate values, and then select Treat "ABC" and "abc" as duplicate values (case insensitive):
  9. Click Next.
  10. For Step 3, accept the default values and then click Next.
  11. For Step 4, accept the default values and then click Save. The new field appears in your list of fields and relationships:

You now have a Salesforce field that maps to Janrain's UUID attribute.