DataSync for Salesforce allows you to seamlessly integrate Salesforce with databases for reporting, analytics and insights on your Salesforce data.
Find minimum requirements and more information here.
This page includes the various steps that you must follow (in order) to set up DataSync for Salesforce.
In order to proceed, you will need to request the Perspectium DataSync for Salesforce managed package from Perspectium Support.
To properly set up the Salesforce application as a connected app, you will need to turn on the Allow OAuth Username-Password Flows option in your Salesforce org (Setup > Identity > OAuth and OpenID Connect Settings).
Install the Perspectium DataSync for Salesforce package and complete Post Installation
Obtain the package instalation link from Perspectium Support. If you are installing your Package to a sandbox (testing) instance, first log out of your Salesforce production organization. Then, replace login in the provided link with test, before navigating to the URL. If you are installing your Package to a non-sandbox instance, simply click the provided link.
Log into Salesforce. In the Install Perspectium DataSync window, select whether you want to install the Package for admins only, all users, or specific profiles. If you select the option to install the Package for specific profiles, select Full Access from the appropriate drop-downs for those profiles that you want to grant access to. Finally, click the Install button.
Once the installer is finished running, click Done. Because the package has many component it may take a few minutes to complete installation and Salesforce may notify you that it will email you when installation is complete.
If you are upgrading the Perspectium DataSync application, you can skip the remaining steps as the following steps will already have been completed from your initial install of the package.
- If the installation is able to complete without having to email you to notify on completion, you will be presented with a Post Installation page to set up the Connected App and Remote Sites for the Perspectium package:
- If you receive a message about the application taking too long to install and being emailed on completion:
After youre've received the installation completed email, you can go to Setup > Installed Packages and click into the Perspectium DataSync for Salesforce package where you can click View next to Post Install Instructions to access the Post Installation Page:
- If you receive a message about the application taking too long to install and being emailed on completion:
- In a separate browser window/tab, open up your Salesforce org and set up a remote site for your Salesforce instance per the instructions in the next section (Configure Salesforce remote site settings). You will only need to create a remote site for your Salesforce instance (such as creating a remote site for https://company-dev-ed.develop.my.salesforce.com/) The remote sites for the Perspectium Integration Mesh and Salesforce login will automatically be created for you as part of this step.
- After creating the remote site for your Salesforce instance, go back to browser tab/window with the above Post Installation page and enter the Integration Mesh URL provided by Perspectium Support. This should be in the format https://<mbsname>.perspectium.net where <mbsname> is the name of your Integration Mesh. Click Submit.
- The Post Installation page will then create a Perspectium_DataSync Connected App as well as create the remote sites for the Perspectium Integration Mesh and Salesforce login.
Upon success, the Next button will be shown to take you to the Perspectium Salesforce application Properties page where you can configure all your properties.
Because it can take up to 10 minutes for the Connected App to take effect in your Salesforce org, wait at least 10 minutes before you click Next and configure your properties on the Properties page. If you try to save the Properties page before the Connected App is fully set up, the Properties page will error and give and INVALID_SESSION_ID error.
Properties such as the Integration Mesh URL and the Consumer Key of the newly created Connected App will be auto populated for you. Fill in the rest of the information (such as the Consumer Secret of the Perspectium_DataSync Connected App that you can access here) and save your changes.
- You can now start using the Perspectium DataSync for Salesforce application. Click here to learn about the features. If there were any issues on initial setup, see the remaining sections on this page to configure and set up the application.
Configure Salesforce remote site settings
You will only need to do the remote site for your Salesforce instance if you are able to complete the Post Installation above. The other remote site settings should be done manually only if there were any issues with the Post Installation process.
In order for the Perspectium package for Salesforce to call an external site (such as the Perspectium Integration Mesh to send messages), the site must be registered in Salesforce's remote site settings. You will need the following information to configure your remote site settings in Salesforce:
- URL for your Salesforce instance (e.g., https://na123.salesforce.com or companyname.my.salesforce.com i.e. https://company-dev-ed.develop.my.salesforce.com/). Depending on what version of Salesforce you have, this URL may be instancename.salesforce.com where na123 is your instance name. You can find your instance name in Company Information. However, you should use the URL of your org as provided in an email to you when your org was created.
URL for your Salesforce login (e.g., https://login.salesforce.com/ or for sandbox instances, https://test.salesforce.com/)
URL for your Perspectium Integration Mesh
To configure your Salesforce remote site settings, follow these steps:
- Log into your Salesforce organization and click the
icon in the top right-hand corner of the screen. Then, click Setup. - In the Quick Find window on the left side of the screen, type and then click Remote Site Settings (under Security).
- At the top of your remote sites list, click New Remote Site.
- Type any name for the remote site that does not contain spaces (e.g., Perspectium_Mesh). Then, enter the URL next to Remote Site URL and ensure that the Active box is checked. Click Save & New at the top or bottom of the form to save your remote site settings.
Repeat Step #4 to configure your Perspectium Apex trigger (URL for your Salesforce sharing/subscribing instance) and your Salesforce OAUTH Token Endpoint (URL for your Salesforce login).
NOTE: If you are using a production Salesforce organization, see deploy Apex triggers to production since Apex triggers can't be created in production.The Apex trigger remote site can also be any name but may be helpful to be named for the Salesforce instance (i.e. Salesforce_Instance_URL) and should use the url of your org as described above
- The Salesforce OAUTH Token endpoint can be any name as well but something to reference should as Salesforce_OAUTH_Token_Endpoint and using the Salesforce login URL as mentioned above.
- Once you have added all relevant URLs, click Save.
Configure Perspectium DataSync as a Salesforce connected app
You will only need to configure a connected app manually if there were any issues with the Post Installation process.
A connected app integrates an application using Salesforce APIs. Connected apps use standard SAML and OAuth protocols to authenticate, provide single sign-on, and provide tokens for use with Salesforce APIs. In addition to standard OAuth capabilities, connected apps allow administrators to set security policies and have explicit control over who may use the corresponding applications.
Perspectium DataSync is a connected app because it uses Salesforce APIs to generate Dynamic Share Apex Triggers. The Salesforce APIs is an OAuth protected service that defines the OAuth scopes and callback URL for the Perspectium DataSync connected app. The connected app configuration provides an OAuth Consumer Key and a Consumer Secret used for authorization.
To properly set up the Salesforce application as a connected app, you will need to turn on the Allow OAuth Username-Password Flows option in your Salesforce org (Setup > Identity > OAuth and OpenID Connect Settings).
To configure Perspectium DataSync as a Salesforce connected app, follow these steps:
- Log into your Salesforce organization and click the
icon in the top right-hand corner of the screen. Then, click Setup. - In the Quick Find window on the left side of the screen, type and then click App Manager (under Apps).
- In the upper right-hand corner of the Lightning Experience App Manager form, click New Connected App.
- Type Perspectium DataSync as the Connected App Name, which will automatically populate Perspectium_DataSync as the API Name. Then, type the email address you use to log into this Salesforce instance next to Contact Email.
- Check the Enable OAuth Settings box under the API Enable OAuth Settings section. Then, if using a non-sandbox Salesforce instance, enter https://login.salesforce.com/services/oauth2/token as the Callback URL. Otherwise, if using a sandbox Salesforce instance, enter https://test.salesforce.com/services/oauth2/token as the Callback URL.
- Under Available OAuth Scopes, select Manage user data via APIs (api). Then, click the icon to add it to the Selected OAuth Scopes list.
- Scroll to the bottom of the form and click Save. You will be redirected to a screen indicating that your connected app may take 2-10 minutes to take effect. Click Continue.
Because it can take up to 10 minutes for the Connected App to take effect in your Salesforce org, wait at least 10 minutes before you configure your properties on the Properties page. If you try to save the Properties page before the Connected App is fully set up, the Properties page will error and give the INVALID_SESSION_ID error.
After completing the steps above, you will be redirected to a page that contains your Consumer Key and Consumer Secret. You will need to keep this information on hand to configure your dynamic share trigger builder properties. This information can also be accessed by following the steps in the next section.
Access your Consumer Key and Consumer Secret
View your Consumer Key and Consumer Secret within the Salesforce Lightning UI by following these steps:
- Log into your Salesforce organization and click the
icon in the top right-hand corner of the screen. Then, click Setup. - In the Quick Find window on the left side of the screen, type and then click App Manager (under Apps). Then, search for the Perspectium DataSync app in the list and click the corresponding dropdown arrow at the far right of the screen and click View from this dropdown.
- Your Consumer Key will be listed under the API (Enable OAuth Settings) section. Within this same section, click Click to reveal next to Consumer Secret to view your Consumer Secret.
Configure Perspectium properties for Salesforce
To configure the Perspectium properties in Salesforce, you will need the following information on hand:
- Perspectium Integration Mesh URL
- Perspectium Integration Mesh username
- Perspectium Integration Mesh password
- Salesforce Consumer Key
- Salesforce Consumer Secret
- Salesforce Security Token
To access your Salesforce Security Token, you will need to reset your token by clicking your avatar in the top right-hand corner of the screen and navigating to Settings > My Personal Information > Reset My Security Token and then clicking the Reset Security Token button. Your new Security Token will be emailed to the account registered to your Salesforce profile.
To configure your Perspectium properties in Salesforce, follow these steps:
- Log into your Salesforce organization and click the
icon in the upper left-hand corner of the screen. Then, click the Perspectium DataSync app. - Then select the Properties tab.
- This will open up the Perspectium General Settings page to configure your Perspectium properties:
- Type your Perspectium Integration Mesh URL, user, and password in the appropriate fields. Then, type an encryption and decryption key of 24+ characters to enable AES-128 encryption. Alternatively, type an encryption and decryption key of 32+ characters to enable AES-256 encryption.
Scroll down to the Dynamic Share Trigger Builder Properties section. This section is control setting up apex triggers when creating dynamic shares. Triggers are used to capture real time changes to records in the selected tables (SObjects) to share out data, similar to business rules in ServiceNow. Type your Consumer Key, Consumer Secret, User, Password, and Security Token.
- (Optional) In the Logging section, choose the level for logging the Perspectium application should log messages at when the application is executing. These logs are Perspectium-specific (they are not the Salesforce debug logging which is controlled by Salesforce setup) and can be found in the Tools tab under the Logs option. You can control how long to keep error and non-error logs before they are deleted.
- (Optional) In the Outbound Messages section, choose the default status to assign outbound messages that were not sent successfully with Default Outbound Message Status. To select how long to retain both inbound and outbound messages, choose a time in the Time to Keep Processed Messages dropdown.
- At the bottom of the page, click Save.