Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  • Navigate to: Setup > Apps > App Manager > New Connected App

  • Connected App Name: ClosePlan Connected App

  • API Name: ClosePlanConnectedApp (NOTE: use this value exactly)

  • Contact Email: enter your email

  • Tick Enable OAuth Settings

  • Callback URL: 

...

  • Paste 'Your domain name' into the Callback URL instead of <<YOUR DOMAIN>>

    • E.g. https://am-showcase-dev-ed.my.salesforce.com/services/authcallback/ClosePlanMetadataAuthProvider

  • Selected OAuth Scopes: 

    1. Full Access

    2. Perform Request on your behalf at any time

  • Click Save > then Continue

Tip

Keep this tab open, information here will be needed for the next steps!

If you have closed the tab, you can still get the information needed: Go to Setup > Apps > App Manager > ClosePlan Connected App. Click the down arrow  and click View

...

  • Open a new window or tab

  • Go to Setup > in the Quick Find box enter Auth. Providers and open it > click New button

  • Provider Type: Salesforce

  • Name: ClosePlan Metadata Auth Provider

  • URL Suffix: ClosePlanMetadataAuthProvider    (NOTE: use this value exactly)

  • Consumer Key: Copy Consumer Key from Connected App detail from step 1 and paste

  • Consumer Secret: Copy Consumer Secret from Connected App detail from step 1. (Click "Click to reveal" to see the value) and paste

  • Default Scopes:  full refresh_token offline_access

  • Click Save and remain on the detail.

    • You can find the Callback parameter in the bottom section. The Callback parameter must match Callback URL entered in step 1

3. Create Named Credentials

  • Open a new tab or window

  • Go to Setup > in the Quick Find box enter Named Credentials > click the New Named Credential button

  • Label: ClosePlan Metadata Service

  • Name: ClosePlanMetadataService (NOTE: use this value exactly)

  • URL: https://<<YOUR DOMAIN>>.my.salesforce.com

    • the same domain name as you entered in the section Created New Connected App - step 1

  • Identity Type: Named Principal

  • Authentication Protocol: OAuth 2.0

  • Authentication Provider: Select ClosePlan Metadata Auth Provider from list 

  • Scope: full refresh_token offline_access

  • Enable Start Authentication Flow on Save (this will initiate authorization on save)

  • Enable Generate Authorization Header

  • Enable Allow Merge Fields in HTTP Body

  • Click Save, you will be redirected to the Salesforce Authorization dialog to Log in. 

    1. If there is an error (blank page), it usually means that changes from previous steps have not yet been propagated. If this is the case, edit the record again and save until you get to auth. dialog properly.

    2. If auth. dialog does not appear within 30 minutes, it is possible that the callback url may be invalid/improperly entered.

  • Login through your credentials

4. Verifying Configuration

After configuring Connected App you can validate if its working by following steps:

  • Go to ClosePlan Admin > Environment > Relationships > Picklist Values

  • If you see the pick-list value configuration, everything is configured properly

          


Info

Connected application exists only to provide internal connection between the package and Salesforce Setup settings.

In classic it would work without connected app, but since Lightning, connection to Salesforce Metadata API and UI API needs to have authorized callout.

App is doing following through mentioned APIs:

  • Controlling our Picklist values (for few ClosePlan objects)

    • Note that any setup changes still need to be executed by admin user, no matter who authorized Connected App Named Credentials.

  • Getting information about Sales Processes (Opportunity Stage setup)

  • Retrieving some additional user settings, such as if they use Comfy/Compact page layouts.

In terms of security, there is not need to be worried.

...