Salesforce Native APIs | Set up your org

Before you can use an integration with a third-party application for absence records in your org, you need to complete a number of setup steps: 

  1. Enable the Native API support, for more information see Enable Native API support.

  2. Create an API user and assign a permission set to the user, for more information see Create the API user and Assign the permission set.

  3. Create a Connected App to manage the access to your org for the third-party application.

  4. Test your setup.

Depending on how you are planning to use the integration, you have optional steps: 

  • If you want the absence records from the third-party application to trigger action events, you need to set up the action events using the If Triggered by API User condition. For more information, see Creating an action event and Events you can use to trigger action events.

  • If you want to switch off the standard validation for absence records or action events being triggered, apply the custom permissions any users you want to make exempt, for more information see Apply custom permissions.

Enable Native API support

To switch on support for creating, updating, and deleting absence records through Salesforce APIs:

  1. Go to Setup, and in Quick Find enter installed, and select Installed Packages from the search results.

  2. For the Human Capital Management package, select Configure.

  3. In the Setup section select the Native API Support checkbox:

    Screenshot: Section of the HCM Configure page displaying the Native API Support option

  4. Select Save.

Create the API user

You need to a create a user used by the integration to create, update, and delete records. Native API support for absence records has been developed with the Salesforce Integration user license and the Minimum Access - API Only Integrations profile in mind. The access to Sage People objects is controlled with a permission set.

  1. Go to Setup, and in Quick Find enter users and select Users from the search results.

  2. On the All Users page select New User.

  3. Complete the user details in the General Information section for the API user. Ensure you assign the User License and Profile as follows:

    • User License: Select the picklist and choose Salesforce Integration. For more information about the Salesforce Integration license type, see the Sage People community article Salesforce Integration Only license type.

    • Profile: Select the picklist and choose Minimum Access - API Only Integrations. If you want to trigger action events from absence records created, updated, or deleted by the integration with the third party application, the If Triggered by API User condition is based on the API user having this profile.

  4. Leave all other setting at default values.

  5. Deselect Generate new password and notify user immediately. Then select Save.

You can now assign the permission set to the API user.

Assign the permission set

Creating, updating, and deleting absence records via the Salesforce APIs requires object and field level permissions to the Absence object and the Employment object granted by the Sage People Native API fta permission set. For the details of this permission set, see Sage People Native API fta.

To assign this permission set to the API user: 

  1. Go to Setup, and in Quick Find enter users and select Users from the search results.

  2. On the All Users page select the name of the API user you created.

  3. On the API user's detail page, scroll to the Permission Set Assignments related list and select Edit Assignments.

  4. From the Available Permission Sets panel select Sage People Native API fta and use the Add button to move it to the Enabled Permission Sets panel.

  5. Select Save.

If your organization has additional custom fields in the Absence object and you want the integration to access these fields, you have 2 options: 

  • Clone the packaged permission set and add field level access to your custom fields to the clone, then assign it to your API user. This solution enables you to use a single permission set for the integration. Using a cloned permission set can make it more difficult for you to stay up to date if Sage People changes the packaged permission set in the future because you will need to make the same changes to your cloned permission set.

  • Create a new permission set to grant appropriate field level access to your custom Absence fields only. This solution involves assigning 2 permission sets to the API user, the packaged permission set and your custom permission set, but avoids the extra work and potential issues if the packaged permission set changes in the future.

Update sharing settings for the Employment field

If you want to use Salesforce APIs to create new absence records in your org, you need to update the sharing settings of the Employment field in the Absence object. This is needed because the Sage People Native API fta permission set grants only Read access to the Employment field.

To update the sharing settings of the Employment field:

  1. Go to Setup.

  2. Click Object Manager.

  3. Select the Absence object.

  4. Click Fields & Relationships.

  5. Select the Employment Record field (fHCM2__Employment__c).

  6. Select Edit.

  7. Go to Master-Detail options and select Sharing Setting.
    screenshot of API master detail section

  8. Select Read Only: Allows users with at least Read access to the Master record to create, edit, or delete related Detail records: Allows users with at least Read/Write access to the Master record to create, edit or delete related records

  9. Click Save

Create a Connected App

A Connected App enables a third party application to access data in the Salesforce org using the OAuth2.0 protocol. For more information about connected apps and how to set it up to meet your integration's needs, see the following Salesforce help articles: 

Apply custom permissions

When you enable Native API support for absence records, the default behavior is to run the same validations and provide the same support for action events as for absence records created in the WX self service portal. You can exclude users from the validation by adding the custom permissions to their user profile or permission set, or creating a new permission set with the custom permissions and assigning the permission set to the users you want to exempt from validations.

Note : If a profile is granted Full Access during package installation, relevant custom permissions will be automatically assigned to that profile.

The custom permissions are: 

  • fta.Disable Absence Validation

    When assigned to a user in a profile or through a permission set, switches off all the validation otherwise run on absences created, updated, and deleted by the user through native APIs. For more information about validations, see Salesforce Native APIs | Absence validations.

  • fta.Disable Absence Action Events

    When assigned to a user in a profile or through a permission set, stops any action events set to trigger as the result of the user's actions from triggering. Requires that Disable Absence Validation is also assigned to the user.

To add the custom permissions to a permission set: 

  1. Go to Setup, and in Quick Find enter permission and select Permission Sets from search results.

  2. Select the permission set to which to add the custom permissions. If you need to create a permission set first, see Creating and modifying a Permission Set for more information.

  3. On the permission set detail page, select Custom Permissions.

  4. From the Custom Permissions section, select Edit.

  5. From the Available Custom Permissions panel, select fta.Disable Absence Validation and fta.Disable Absence Action Events and use the Add button to move them to the Enabled Custom Permissions panel. Then select Save.

  6. Assign the permission set to the user, see Assign the permission set in this topic.