Salesforce Dynamic Account
In this article
Overview
You can use this account type to connect Salesforce Snaps with data sources that use Salesforce Dynamic account.
Expression-enabled authentication fields, such as Username, Password, and Client Secret, support Secrets Management, a SnapLogic add-on that allows you to store endpoint credentials in a third-party secrets manager, such as AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault. During validation and execution, pipelines obtain the credentials directly from the secrets manager. Learn more: Configure Accounts to use secrets.
Prerequisites
None.
Limitations
None.
Account Settings
Field Name | Field Type | Description |
---|---|---|
Label* Default Value: None | String | Specify the name for the account instance. |
Access token* Default Value: N/A | String/Expression | Specify the access token for Salesforce.com. |
Instance URL* Default Value: N/A | String/Expression | Specify the instance URL to be used to access Salesforce.com. |
Using a Dynamic Token in a Dynamic Account
To use a Dynamic Token from Salesforce with a dynamic account, you will need to create:
- A Pipeline to perform the desired Salesforce actions.
- A triggered task to call that pipeline.
- A REST Get Pipeline to query for the token information.
- A Salesforce Dynamic Account with values supplied by Pipeline parameters. You must use Pipeline parameters since accounts get initialized before Snaps.
You need to create a new connected app in Salesforce. For details, see the Creating a new Connected App post in SnapLogic Community. Also see Setting up OAuth2 authorization in Salesforce.
Salesforce Pipeline
Create a Salesforce Pipeline (with any Salesforce Snaps) using the following Pipeline parameters:
- accessToken
- instanceURL
You will supply values for them in the triggered task. The necessary Salesforce Dynamic Account will be created later, so bypass that for now.
Triggered Task
Create a triggered task for the Salesforce Pipeline. Supply the instance_url and access_token values received from the grant_type POST to the Pipeline parameters.
REST Get Pipeline
Create a REST Get pipeline that calls the Salesforce triggered task with the query parameters such as:
Salesforce Dynamic Account
In the Salesforce Pipeline, create a Salesforce Dynamic Account within the Salesforce Snap used.
Set the expression toggle on for both Access token and Instance URL.
Set Access token to _accessToken and Instance URL to _instanceURL.
Example
Salesforce Snap Reading the Bulk Records with the Dynamic Account Enabled
The Snap reads records from the Account object, and retrieves values for the 10 output fields (Output field limit) starting from the 3rd field (Output field offset). Additionally, we are passing the values dynamically with the expressions enabled. The Pipeline parameters to be passed dynamically are set for the Access token and the Instance URL fields.
The Key and Value parameters are assigned using the Edit Pipeline property on the designer. For this Pipeline, define the following parameters:
- accessToken
- instance
The Salesforce Read Snap reads the records from the object, Account, to the extent of 10 records starting from the 3rd record (by defining the properties- Output field limit and Output field offset with the values 10 and 3 respectively).
Create a dynamic account and toggle (enable) the expressions for Access Token and Instance URL properties in order to pass the values dynamically.
Set Access token to _accessToken and Instance URL to _instance_url. Note that the values are to be passed manually and are not suggestible.
Successful execution of the Pipeline displays the tables in the output.
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.