Salesforce Integration

As of version 3.07.x, EasyTerritory supports integration with Salesforce version 42 and up. The only authentication model EasyTerritory supports with Salesforce is OpenID Connect. The only deployment model supported is cloud for both EasyTerritory and Salesforce.

Get started with these easy configuration steps:

Step 1: You must register an instance of EasyTerritory in Salesforce in order for Salesforce to be the identity provider.

  • – In your Salesforce instance, navigate to the ‘Setup Home’ page. On Sidebar navigation pane expand ‘Apps’ and select App Manager.
  • – In the App Manager dialogue select ‘New Connected App’ button.
  • – Simply give the app and API a name. Once the app is created, edit the app to add more required information. The dropdown on the right of the list provides an edit link.
  • – Enter the fully-qualified callback URLs for the following pages in EasyTerritory:
    • • Index.aspx (and index.aspx)
    • • OidcSilentRefresh.aspx
    • • OidcPopupCallback.aspx (if using a popup login)
  • – Also add the following Scopes:
    • • Access and manage your data (api)
    • • Access your basic information
    • • Allow access to your unique identifier
    • • Perform requests on your behalf
  • – Check the boxes:
    • • Require Secret for Web Server Flow
    • • Configure ID Token
    • • Include Standard Claims
  • – In the ‘Token Valid for’ field enter value ‘0’
  • – In the ‘Token Audiences’ enter ‘CONSUMER_KEY’
  • – Save and Close

Step 2: Configure connected OAuth Usage so that users can self-authorize

  • – Under Apps > Connected Apps > Manage Connected Apps, click ‘edit’ next to the name of your App.
  • – In the ‘Permitted Users’ dropdown select ‘All users may self-authorize’
  • – And in the ‘Refresh Token Policy’ select the ‘Expire refresh token if not used for 1 Day(s)’ radio button

Step 3: Add Whitelisted Origin for the domain.

  • – In the Salesforce setup navigate to Security > CORS
  • – Click ‘New’
  • – Add Whitelisted Origin for the EasyTerritory domain:
    • • Value: or https://*

Step 4: Configure Salesforce as Identity Provider in EasyTerritory

  • – Notify an EasyTerritory administrator that you would like your Salesforce URL as a permitted origin in your EasyTerritory instance.
  • – Login to EasyTerritory with an admin user and click the ‘admin‘ link on the top right corner of the application.
  • – In ‘Application Settings’ configure the following fields:
  • – (1) The only Authentication type supported with Salesforce is OpenID Connect
  • – (2) This will always be
  • – (3) This is the client id obtained from the Consumer Key in the Connected Apps management area
  • – (4) This is the client secret obtained from the Consumer Secret in the Connected Apps management area
  • – (5) This is checked for Salesforce so that all OpenID Connects calls are routed through the EasyTerritory Server avoiding and CORS conflicts
  • – (6) This will always be set to Salesforce
  • – (7) This is your cloud hosted salesforce instance
  • – (8) This is for future expansion for supporting Salesforce without it being an IdP (currently unused)
  • – (9) This is an optional object schema name of the EZT queue in Salesforce to receive pushed data
  • – (10) This is an optional comma-delimited list of submission types
  • – (11) This is the optional JSON field mapping between internal EasyTerritory fields and Salesforce fields in your EZT queue:
    • {"eztUserId":"Ezt_User_Id__c", "submissionId":"Submission_Id__c", "submissionName":"Name", "submissionType": "Submission_Type__c", "submissionInfo":"Submission_Info__c", "assignedDate":"Assigned_Date__c", "markupTagValue":"Markup_Tag_Value__c", "relatedCrmEntityName":"Related_Crm_Object_Name__c", "relatedCrmEntityId": "Related_CRM_Object_Id__c"}
  • – (12) This is a comma-delimited list of Salesforce objects to look for list-views for creating CRM layers in EasyTerritory. These views must have some kind of location information such as an address or latitude and longitude

Step 5: Browse to EasyTerritory

  • – Once browsing to your EasyTerritory instance URL you will be redirected to your Salesforce Idp login page and after entering in your Salesforce credentials you will be prompted to allow EasyTerritory to access you Salesforce user information.
  • – Click allow and you will be logged in to your EasyTerritory instance.