The Salesforce Provisioning Plugin provisions Contacts to Salesforce via the Force.com REST API.
Operations
Registry CO Person Transaction | Changelog Action |
---|---|
Add | Synchronize the CO Person with Salesforce |
Edit | Synchronize the CO Person with Salesforce |
Enter Grace Period | No changes (unless attributes change as part of grace period) |
Expiration / Becomes Inactive | Synchronize the CO Person with Salesforce |
Unexpire / Becomes Active | Synchronize the CO Person with Salesforce |
Delete | No changes |
Manual Provision | Synchronize the CO Person with Salesforce |
Registry CO Group Transaction | Changelog Action |
---|---|
Add | No changes |
Edit | No changes |
Delete | No changes |
Manual Provision | No changes |
Registry CO Email List Transaction | Changelog Action |
---|---|
Add | No changes |
Edit | No changes |
Delete | No changes |
Manual Provision | No changes |
Configuration
- This is a non-core plugin, see Installing and Enabling Registry Plugins for more information.
- If you already have a Salesforce Server defined with the appropriate configuration (perhaps for use with the Salesforce Source) you can reuse it instead of defining a new one. You only need to complete step 6.
- Add a new Server, via Servers > Add a New Server
- Set the server type to OAuth2.
- After the configuration has been saved, a Redirect URI will be available via the server configuration page. Keep this handy for the next step.
- In another browser tab or window, login to Salesforce. Add a new Connected App via Setup > Quick Links > Manage Apps. Click the New button in the Connected Apps section.
- Set the Connected App Name and Contact Email.
- Under API, tick Enable OAuth Settings.
- Set the Callback URL to the URI provided in step 1, above.
- Added at least these two OAuth Scopes:
- Access and manage your data (api)
- Perform requests on your behalf at anytime (refresh_token, offline_access)
- Click Save. (You may need to scroll up to see the confirmation message.)
- On the next page, a Consumer Key and Consumer Secret will be made available. Keep these handy for the next step.
- Return to the OAuth2 Server configuration and complete the configuration.
- Server URL: The base URL of your Salesforce instance with
/services/oauth2
appended, eg https://test.salesforce.com/services/oauth2- The plugin will work with either the generic service name (test.salesforce.com) or a specific instance (cs123.salesforce.com), but note that Salesforce periodically migrates customers to new instances (in Salesforce terms, an instance refresh). In such an event, when configured with the generic service name the plugin should detect the new instance automatically, though it may be necessary to obtain a new token (described below).
- Client ID: The Consumer Key obtained in step 2.
- Client Secret: The Consumer Secret obtained in step 2.
- Access Token Grant Type: Authorization Code
- Scope: (Leave blank)
- Click Save.
- Server URL: The base URL of your Salesforce instance with
- Define a new CO Provisioning Target using the SalesforceProvisioner plugin. On the configuration page, select the Server set up above and click Save.
- Finally, return to the OAuth2 Server configuration to obtain an OAuth token.
- The configuration should indicate that the Access Token is "Not Set", and there should now be a button "Obtain New Token".
- Upon clicking that button, you will be taken to the Salesforce login page. Log in as a sufficiently authorized user.
- After successful login, you should be returned to the OAuth2 Server configuration page, and the Access Token should now be "Set".
- Should it ever be necessary to obtain a new token (eg: if the administrator who performed the initial setup no longer has a valid Salesforce account), simply return to the configuration page and click the "Obtain New Token" button again.
CoPerson Custom Object
The SalesforceProvisioner plugin supports the use of a Salesforce Custom Object in order to provide additional attributes (see below) beyond what is supported in the Salesforce Contact record. To enable support for the CoPerson Custom Object:
- Login to Salesforce and navigate to Setup > Create > Objects.
- Click New Custom Object. Use the follow (exact) values:
- Label: CoPerson
- Plural Label: CoPeople
- Object Name: CoPerson
- Record Name: CoPerson ObjectID
- Data Type: Auto Number
- Display Format: C{0}
- Starting Number: 100000 (or whatever number you prefer)
- Deployment Status: Deployed
- Create the following Custom Fields, again using the exact configuration specified:
- Field Label and Field Name: Contact
- Data Type: Master-Detail
- Related To: Contact
- Child Relationship Name: CoPeople
- Field Label and Field Name: Application ID
- Data Type: Text
- Length: 255
- Field Label and Field Name: ORCID
- Data Type: Text
- Length: 255
- Field Label and Field Name: Platform ID
- Data Type: Text
- Length: 255
- External ID: Checked
- Field Label and Field Name: Status
- Data Type: Text
- Length: 32
- Field Label and Field Name: Contact
- In the COmanage plugin configuration, tick Enable CoPerson Custom Object Support.
- Setting an Identifier type for CoPerson Platform ID Identifier Type is required. This identifier is considered by Salesforce as the External ID, and so must always be populated and unique. Identifier Assignments may be useful.
The above instructions will not cause the Custom Object to appear on the Contact page, though it is visible if directly addressed.
Attributes
The Salesforce Provisioner uses the following attribute mapping:
Registry Attribute | Salesforce Attribute | Notes |
---|---|---|
Address:country (type postal ) | MailingCountry | First Address of type postal associated with the first CoPersonRole Values must be from Salesforce picklist. Attribute Enumerations may be useful. |
Address:locality (type postal ) | MailingCity | First Address of type postal associated with the first CoPersonRole |
Address:postal_code (type postal ) | MailingPostalCode | First Address of type postal associated with the first CoPersonRole |
Address:state (type postal ) | MailingState | First Address of type postal associated with the first CoPersonRole Values must be from Salesforce picklist. Attribute Enumerations may be useful. |
Address:street (appended with Address:room, if set) (type postal ) | MailingStreet | First Address of type postal associated with the first CoPersonRole |
CoPerson:status | CoPerson__c:Status__c | If CoPerson custom object is enabled |
CoPersonRole:ou | Department | Department associated with the first CoPersonRole, sorted by CoPersonRole order. |
CoPersonRole:title | Title | Title associated with the first CoPersonRole, sorted by CoPersonRole order. |
EmailAddress:mail | If Email Address Type is set, the first Email Address of the specified type is used. Otherwise, the first Email Address of any type is used. | |
Identifier:identifier | CoPerson__c:Application_ID__c | If CoPerson custom object is enabled, type as configured in CoPerson Application ID Identifier Type |
Identifier:identifier | CoPerson__c:Platform_ID__c | If CoPerson custom object is enabled, type as configured in CoPerson Platform ID Identifier Type |
Identifier:identifier (type orcid ) | CoPerson__c:ORCID__c | If CoPerson custom object is enabled |
Name:honorific | Salutation | Primary Name is used, regardless of type |
Name:given | FirstName | Primary Name is used, regardless of type |
Name:middle | Middlename | Primary Name is used, regardless of type Middle Name is not enabled by default in Salesforce. Once enabled there, tick Provision Middle Name in the Provisioner configuration. |
Name:family | LastName | Primary Name is used, regardless of type |
Name:suffix | Suffix | Primary Name is used, regardless of type |
TelephoneNumber:number (type mobile ) | MobilePhone | First TelephoneNumber of type mobile associated with the first CoPersonRole |
TelephoneNumber:number (type office ) | Phone | First TelephoneNumbe of type office associated with the first CoPersonRole |
Understanding API Usage
The Salesforce API has request limits that vary according to the service tier and available licenses. To view current API usage, use the Salesforce Source plugin if configured, or login to Salesforce and navigate to Reports > Administrative Reports > API Usage Last 7 Days.
Note that the API call required to determine the current API limits counts against the API limit.
In general, each provisioning operation (create or update) requires 1 API call, plus an additional API call if the CoPerson custom object is enabled.