You can find your Salesforce app credentials in your Salesforce Developer Account.You’ll need the following information to set up your Salesforce App with Paragon Connect:
Under Integrations > Connected Integrations > Salesforce >Settings, fill out your credentials from the end of Step 1 in their respective sections:
Consumer Key: Found under Manage Connected Apps > API (Enable OAuth Settings) > Consumer Key on your Salesforce App page.
Consumer Secret: Found under Manage Connected Apps > API (Enable OAuth Settings) > Consumer Secret on your Salesforce App page.
Permissions: Select the scopes you’ve requested for your application. For a list of recommended scopes, please view this integration within your Paragon dashboard. View dashboard.
Note: Leaving the Client ID and Client Secret blank will use Paragon development keys.
Note: Salesforce API access is limited to Enterprise, Unlimited, and Performance Editions of Salesforce, as well as Professional Editions with the paid API add-on. See Salesforce documentation for more information.
Once your users have connected their Salesforce account, you can use the Paragon SDK to access the Salesforce API on behalf of connected users.See the Salesforce REST API documentation for their full API reference.Any Salesforce API endpoints can be accessed with the Paragon SDK as shown in this example.
Copy
Ask AI
// You can find your project ID in the Overview tab of any Integration// Authenticate the userparagon.authenticate(<ProjectId>, <UserToken>);// Create an Accountawait paragon.request("salesforce", "/sobjects/Account", { method: "POST", body: { "Name": "Express Logistics and Transport" }});// Query Accountsawait paragon.request("salesforce", "/query/Account", { method: "GET", body: { "q": "SELECT+name+from+Account" }});
Working with Salesforce Custom Objects and Custom Fields
It’s common that different Salesforce instances may be configured with different Custom Objects or Custom Fields. Paragon provides the ability for your users to choose their own Custom Object mapping. You can also deploy Custom Objects or Custom Fields that may be specific to your application to your users’ Salesforce instances.
To allow your users to choose their own Custom Object Mapping, add the Custom Object Mapping user setting in your Connect Portal Editor. You should give this setting a descriptive user-setting name, for example, if you’re mapping contacts from your app to Salesforce, you might call this “Map Contacts to this object”.
Below, add a label for each object property that should be mapped from your app to a Salesforce object field. In our contacts example, you might add labels for “First Name”, “Last Name”, and “Email”.In your Connect Portal, your users will be prompted to select an object from their Salesforce instance when enabling this workflow. For each of the object properties you labeled, your users will be prompted to select which object field that property should be mapped to.In the workflow editor, you can now access your user’s custom object mapping in the variable menu. For example:
To deploy Custom Objects or Custom Fields to your users’ Salesforce instances, use the Deploy Custom Object or Deploy Custom Field Salesforce workflow actions.Both Deploy Custom Object and Deploy Custom Field will upsert by default, for example, if you run Deploy Custom Field on an existing Custom Field, it will apply any relevant updates to the Custom Field.
You can reference any Salesforce object (provided that the object exists in your user’s Salesforce instance) when creating, updating, or searching records by selecting Custom Object under Record Type and referencing the Object Name.Similarly, you can reference any Salesforce field (provided that the field exists on the target object) when creating or updating records.The Object Name for Custom Objects and the Field Name for Custom Fields are both suffixed with __c.
Webhook triggers can be used to run workflows based on events in your users’ Salesforce account. For example, you might want to trigger a workflow whenever new contacts are created in Salesforce to sync your users’ Salesforce contacts to your application in real-time.
You can find the full list of Webhook Triggers for Salesforce below: