This guide explains what you, as the customer, need to provide to enable the integration between your Salesforce CRM and our platform.
1. Prerequisites
Before proceeding, ensure you have the following:
-
Admin access to your Salesforce account.
-
Access to the Salesforce Developer Console.
2. Create a Salesforce Connected App
To enable the integration, you need to create a Salesforce Connected App. Follow these steps:
Steps to Create a Connected App
-
Log in to your Salesforce Developer Account.
-
Navigate to Setup > App Manager.
-
Click on the New Connected App button.
-
Fill in the basic information:
-
Connected App Name: Enter a suitable name (e.g., "Marketplace Integration").
-
API Name: Provide a unique API name.
-
Contact Email: Enter your contact email address.
-
-
Enable OAuth Settings:
-
Check the Enable OAuth Settings box.
-
-
Configure the Callback URL:
-
Enter the URL where Salesforce will redirect the user after authentication. Example: https://www.yourapp.com/callback-url.
-
-
Add OAuth Scopes:
-
Add the required scopes (e.g., openid, profile, email).
-
-
Save the Connected App.
-
Obtain the Consumer Key and Consumer Secret:
-
After saving, note down the Consumer Key and Consumer Secret from the Connected App detail page.
-
3. Configure OAuth Flow
Steps to Configure OAuth Flow
-
Implement the OAuth 2.0 authorization flow in your app:
-
Create a Login with Salesforce button in your app's user interface.
-
Redirect users to the Salesforce OAuth authorization endpoint:
https://login.salesforce.com/services/oauth2/authorize. -
Include the following parameters in the redirect URL:
-
response_type=code
-
client_id={your_consumer_key}
-
redirect_uri={your_callback_url}
-
scope={requested_scopes} (e.g., openid, profile, email)
-
-
-
Handle the callback from Salesforce:
-
Extract the code parameter from the callback URL.
-
-
Exchange the authorization code for an access token:
-
Make a POST request to the Salesforce token endpoint:
https://login.salesforce.com/services/oauth2/token. -
Include the following parameters:
-
grant_type=authorization_code -
client_id={your_consumer_key} -
client_secret={your_consumer_secret} -
redirect_uri={your_callback_url} -
code={the_code_from_callback}
-
-
Parse the response to retrieve the access token and refresh token.
-
4. Provide Webhook Details
Steps to Provide Webhook Details
-
Identify the Salesforce objects (e.g., Accounts, Contacts) for which you want to receive updates.
-
Provide the following details to the delivery team:
-
Object Name: The Salesforce object to monitor.
-
Events: The events to track (e.g., Create, Update, Delete).
-
Webhook Endpoint URL: The URL where webhook data should be sent.
-
5. Share Details with the Delivery Team
Once you have completed the setup, share the following details with the delivery team:
-
Consumer Key
-
Consumer Secret
-
Access Token
-
Refresh Token
-
Webhook Details