Salesforce Notifier

Prev Next

The Salesforce Notifier Output Block sends extracted data from a flow to Salesforce. The block runs an integration flow that you build. The integration flow controls how Hyperscience transforms, maps, and writes submission data to Salesforce.

Accessing this feature

Your access to the feature described in this article depends on your license package and pricing plan.

To learn which features are available to your organization and how to add more, contact your Hyperscience representative.

The block is available in SaaS and on-premise deployments.

Two Salesforce Notifier blocks in v44.0.1 and later

Beginning in v44.0.1, Flow Studio lists two Salesforce Notifier Output Blocks:

  • Salesforce Notifier Output Block runs an integration flow.

  • Salesforce Notifier (Deprecated) Output Block uses fixed field mappings and is removed in v46.

Sample use cases

The following are sample use cases for the block:

  • Store extracted data from other sources on a Salesforce object.

  • Update the related Salesforce object with extracted data after a customer-managed integration creates a submission through the Hyperscience Submission API.

  • Update customer data in Salesforce from customer forms.

Beginning in v43.2, the legacy Salesforce Listener Block is no longer supported

This change applies only to the Salesforce Listener Block. For supported ingestion options and migration guidance, see [43.2 and later] Salesforce Listener Block Deprecation.

How the block works

The Salesforce Notifier Output Block runs the integration flow that you select in its Integration Flow setting. For each submission payload, the block starts the integration flow and passes it the submission identifier, the payload identifier, and the Salesforce credentials. The integration flow retrieves the submission data and writes it to Salesforce.

Because the write-back logic is in your integration flow, you choose the Salesforce objects to update, the field mappings, and whether to create or update records.

Block settings table

Configure the following settings in the Salesforce Notifier Output Block. For the settings of the deprecated block, see Salesforce Notifier (Deprecated) Output Block.

Name

Required?

Description

Routing Filter

No

To learn more about this setting, see Universal Integration Block Settings.

Integration Flow

Yes

The custom Hyperscience flow that contains your Salesforce write-back logic. The block runs this flow for each submission payload. See Build the integration flow.

Associated Username

Yes

The username associated with the Salesforce Connected App or External Client App.

Consumer Key

Yes

The Consumer Key from the Salesforce Connected App or External Client App.

Private Key

Yes

The private key that you generate when you configure authentication in Salesforce.

Sandbox Environment

Yes

Indicates whether the connected Salesforce org is a sandbox.

Set up the Salesforce Notifier Output Block

To send data to Salesforce, complete the following stages in order:

  1. Build the integration flow.

  2. Set up Salesforce.

  3. Configure the Salesforce Notifier Output Block in Flow Studio.

Build the integration flow

The integration flow is a custom Hyperscience flow that contains your Salesforce write-back logic. It receives the inputs described in How the block works.

In the integration flow, retrieve the submission data and write it to Salesforce as your process requires: select the Salesforce objects, map the fields, and decide whether to create or update records.

To build the flow, use the Flows SDK. See the Flows SDK documentation.

Set up Salesforce

Complete the following setup in the Salesforce org that the block connects to.

Install and set up the Hyperscience package

Install the Hyperscience package

  1. Go to the Hyperscience Platform listing on the Salesforce AppExchange.

  2. Click Get It Now.

  3. Enter your details and click Contact Me.

    • A Hyperscience representative contacts you and provides the Hyperscience package.

  4. Install the package in your Salesforce org.

Assign the Hyperscience Permission Set

Assign the permission set to each user who needs access to the Hyperscience app in Salesforce.

  1. Go to Setup.

  2. In the Quick Find box, enter Permission Sets, and click Permission Sets.

  3. Click Hyperscience Permission Set.

  4. Click Manage Assignments.

  5. Click Add Assignments.

  6. Select the checkbox for each user who needs access.

  7. Click Assign, and then click Done.

Add Hyperscience__Supervision_Task__c to Change Data Capture

  1. Go to Setup.

  2. In the Quick Find box, enter Change Data Capture, and click Change Data Capture.

  3. In Available Entities, search for Hyperscience__Supervision_Task__c.

  4. Select Hyperscience__Supervision_Task__c and click the right arrow. Confirm that the entity appears in Selected Entities.

Enable the Query All Files permission

  1. Go to Setup.

  2. In the Quick Find box, enter Permission Sets, and click Permission Sets.

  3. Click Hyperscience Permission Set.

  4. Click App Permissions.

  5. Select Query All Files.

Add the Hyperscience URL

  1. In Salesforce, search your apps for Hyperscience, and click the Hyperscience app.

  2. Click the Core Setup tab.

  3. Click Edit.

  4. Enter the full URL of your Hyperscience instance.

  5. Click Save.

Configure authentication

The authentication steps depend on whether you use a Salesforce Connected App or an External Client App. External Client Apps offer improved security and packaging options compared to Connected Apps. If your Salesforce org does not show an option to create a Connected App, follow the External Client App instructions.

Salesforce Connected App

Generate the private key and certificate

  1. Create the private key (salesforce.key) and the certificate (salesforce.crt):

    openssl req -x509 -sha256 -nodes -days 36500 -newkey rsa:2048 -keyout salesforce.key -out salesforce.crt
  2. Copy the private key to your clipboard:

    cat [private.key file] | sed 's/$/\\n/' | tr -d '\n' | pbcopy
  3. Paste the private key into a secure text file and save it. You enter it in the Private Key setting of the Salesforce Notifier Output Block.

Create the JWT Connected App

  1. Log in to Salesforce and go to Setup.

  2. Go to Apps > App Manager and click New Connected App.

  3. Enter the information in the Basic Information section.

  4. In API (Enable OAuth Settings), select Enable OAuth Settings.

  5. In Callback URL, enter http://localhost.

  6. Select Use digital signatures and upload the salesforce.crt file that you generated.

  7. In Selected OAuth Scopes, add the following scopes:

    • Manage user data via APIs (api)

    • Perform requests at any time (refresh_token, offline_access)

  8. Click Save. The settings look similar to the following screenshot:

    Connected App API (Enable OAuth Settings) section with the settings described in the previous steps.

Configure the app policies

  1. On the app page, click Manage.

  2. Click Edit Policies.

  3. In OAuth policies, change Permitted Users to Admin approved users are pre-authorized.

  4. Click Save.

  5. On the app page, in the Profiles section, click Manage Profiles.

  6. On the Application Profile Assignment page, assign the profile of the service account user. You enter this user in the Associated Username setting of the block, and Salesforce logs the user's details for each object update.

Retrieve the Consumer Key

  1. Go to Apps > App Manager.

  2. Find the Connected App that you created.

  3. In the app's row, click the drop-down menu and select View.

  4. In API (Enable OAuth Settings), copy the Consumer Key. You enter it in the Consumer Key setting of the block.

External Client App

Before you start, confirm that you have the following:

  • Salesforce System Administrator access

  • OpenSSL installed for generating keys and certificates

  • The API Enabled permission granted to profiles

The integration is server-to-server. No user interaction, such as a browser redirect, is required.

Generate the private key and certificate

  1. Create the private key (salesforce.key) and the self-signed certificate (salesforce.crt) for JWT signing. You upload the certificate to Salesforce in a later step.

    openssl req -x509 -sha256 -nodes -days 36500 -newkey rsa:2048 -keyout salesforce.key -out salesforce.crt
  2. Copy the private key to your clipboard:

    macOS

    cat salesforce.key | sed 's/$/\n/' | tr -d '\n' | pbcopy

    Linux

    xclip -selection clipboard < salesforce.key

    Windows (Git Bash)

    cat salesforce.key | clip
  3. Paste the private key into a secure text file and save it. You enter it in the Private Key setting of the Salesforce Notifier Output Block.

Create the External Client App

  1. Log in to Salesforce and go to Setup.

  2. In the Quick Find box, enter External Client Apps, and click External Client App Manager.

  3. Click New External Client App.

  4. In Basic Information, enter the app name, such as Hyperscience Integration, a contact email, and a description.

  5. In API (Enable OAuth Settings), select Enable OAuth Settings.

  6. In Callback URL, enter http://localhost. The JWT flow does not use this value, but Salesforce requires it.

  7. Select Enable JWT Bearer Flow and upload the salesforce.crt file that you generated.

  8. In Selected OAuth Scopes, add the following scopes:

    • Manage user data via APIs (api)

    • Perform requests at any time (refresh_token, offline_access)

  9. Click Save.

API settings for OAuth with selected scopes and certificate upload options displayed.

Configure the app policies

After you save the External Client App, configure its policies.

  1. Under Policies, click Edit.

  2. Click Policies.

  3. In OAuth Policies, confirm that Permitted Users is set to Admin approved users are pre-authorized. A view for selecting profiles and permission sets appears.

  4. Select the profile or permission set for the Hyperscience service account, such as Hyperscience Permission Set.

  5. Click Save.

If authentication fails, add the openid scope. Salesforce sometimes requires it when JWT authentication is used for user identity.

Retrieve the Consumer Key (Client ID)

  1. On the same page, click Settings, and then click OAuth Settings.

  2. Click Consumer Key and Secret.

  3. Copy the Consumer Key and save it in a secure text file. You enter it in the Consumer Key setting of the block.

Configure the Salesforce Notifier Output Block

Before you start, confirm that the integration flow exists and that you have the Consumer Key and the private key from the Salesforce setup.

  1. Log in to your Hyperscience instance.

  2. Go to Flows, and click the name of the flow.

  3. Click Edit Flows.

  4. In Flow Studio, click Outputs.

  5. Click Add.

  6. Select Salesforce Notifier Output Block.

  7. In Integration Flow, select the integration flow that you built. See Build the integration flow.

  8. Configure the remaining settings. See Block settings table.

After you deploy the flow, process a test submission and confirm that Salesforce contains the expected updates.

Salesforce Notifier (Deprecated) Output Block

Beginning in v44.0.1, Flow Studio labels the previous Salesforce Notifier block Salesforce Notifier (Deprecated) Output Block. The deprecated block looks up one Salesforce object and updates its fields with extracted data. It uses the fixed Lookup Field Mapping and Document Field Mappings settings. The block is removed in v46.

To keep using the deprecated block, click Add in Flow Studio and select Salesforce Notifier (Deprecated) Output Block.

Deprecated block settings

Configure the following settings in the Salesforce Notifier (Deprecated) Output Block.

Name

Required?

Description

Routing Filter

No

To learn more about this setting, see Universal Integration Block Settings.

Associated Username

Yes

The username associated with the Salesforce Connected App or External Client App.

Consumer Key

Yes

The Consumer Key from the Salesforce Connected App or External Client App.

Private Key

Yes

The private key that you generate when you configure authentication in Salesforce.

Sandbox Environment

Yes

Indicates whether the connected Salesforce org is a sandbox.

Object API Name

Yes

The API name of the Salesforce object to look up and update.

Create New Record on Lookup Failure

Yes

If enabled, Hyperscience creates a new record when the lookup does not find a record that matches the lookup parameters. If disabled, the lookup fails when no record matches.

Lookup Field Mapping

Yes

Key-value pairs that define which Salesforce fields the lookup queries and which extracted data it queries them with, for example, "DOCUMENT_FIELD_NAME": "OBJECT_FIELD_API_NAME".

Document Field Mappings

Yes

Key-value pairs that define which Salesforce fields Hyperscience updates and which extracted data it updates them with, for example, "DOCUMENT_FIELD_NAME": "OBJECT_FIELD_API_NAME".

Overwrite Existing Field Data?

Yes

If enabled and the selected field contains data, Hyperscience overwrites that data. If disabled and the selected field contains data, Hyperscience does not overwrite it, and the operation fails.

Migrate from the deprecated block

Migrate each flow that uses the deprecated block before you upgrade to v46.

  1. Build an integration flow that reproduces the lookup and field mappings of your deprecated block. See Build the integration flow.

  2. In Flow Studio, add the Salesforce Notifier Output Block to the flow.

  3. In Integration Flow, select the integration flow.

  4. Configure the remaining block settings. See Block settings table.

  5. Process a test submission, and confirm that Salesforce is updated as expected.

  6. Remove the deprecated block from the flow, and deploy the flow.

This sequence keeps both blocks in the flow while you test.