Salesforce Notifier

Salesforce Notifier

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.

With the Salesforce Notifier Block, you can configure your flow to send extracted information to Salesforce.

The Salesforce Notifier Block can use extracted information to look up, and then update any number of fields on a Salesforce object.

The Salesforce Notifier Block is available in both SaaS and on-premise versions of the Hyperscience application.

Sample use cases

Block settings table

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 key generated during the authentication-configuration process
Sandbox Environment Yes Indicates whether the connected Salesforce instance is a sandbox environment
Object API Name Yes API name of the object in Salesforce to look up and update
Create New Record on Lookup Failure Yes If enabled, Hyperscience creates a new record if the lookup fails to find a record with the given lookup parameters. If disabled, the lookup fails if it doesn’t find a record with the given lookup parameters.
Lookup Field Mapping Yes A set of key-value pairs indicating which Salesforce fields should be queried in the lookup and the extracted data that should be queried in those fields (e.g., “DOCUMENT_FIELD_NAME”: “OBJECT_FIELD_API_NAME”)
Document Field Mappings Yes A set of key-value pairs indicating the Salesforce fields Hyperscience should update and the extracted data they should be updated with (e.g., “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 the existing data, and the operation fails.

Setting up Salesforce Notifier

Setup within Salesforce

Install and set up Hyperscience Package

  1. Install the Hyperscience package in the desired Salesforce org.

  2. Go to the Salesforce AppExchange’s Hyperscience Platform (opens in new tab) listing.

  3. Click the Get It Now button.

  4. Enter your details and click the Contact Me button.

    1. A Hyperscience representative will contact you and provide you with the Hyperscience package.
  5. Once you have the Hyperscience package, install it in the desired Salesforce org.

  6. Add Hyperscience Permission Set to users that should have access to the Hyperscience application.

  7. Go to the Setup page.

    1. Search for “Permission Sets” and click the Permission Sets link.
    2. Go to Hyperscience Permission Set.
    3. Click Manage Assignments.
    4. Click Add Assignments.
    5. Select the users you want to give permissions to Hyperscience application by checking the checkbox for each user.
    6. Click Assign and then Done.
  8. Make sure that Hyperscience__Supervision_Task__c is added to Change Data Capture Events.

  9. Enable the Query All Files permission.

Add the Hyperscience URL

  1. Search your apps for “Hyperscience”. Click on the Hyperscience app.
  2. Click on the Core Setup tab.
  3. To edit the Hyperscience URL, click Edit.
  4. Enter the full URL for your Hyperscience app.
  5. Click Save.

Configure authentication

The steps required to configure the authentication for the connection depend on whether you’re using a Salesforce Connected App or an External Client App. The External Client App offers improved security and packaging options compared to Connected Apps.

Salesforce Connected App

Generate private key

  1. Create the private key (salesforce.key) and certificate (salesforce.crt) by running the following command:
openssl req -x509 -sha256 -nodes -days 36500 -newkey rsa:2048 -keyout salesforce.key -out salesforce.crt
  1. Copy the private key to your clipboard.
cat [private.key file] | sed 's/$/\\n/' | tr -d '\n' | pbcopy
  1. Paste the private key into a text file and save it. Later, you will need to paste it into your Salesforce Notifier Block within Hyperscience.

Create your JWT Connected App

  1. Log in to Salesforce and go to Setup.
  2. In the side navigation, 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), complete the following steps:
    1. Disable the Enable OAuth Settings option.
    2. In Callback URL, enter “http://localhost”.
    3. Disable the Use digital signatures option and upload the salesforce.crt file that was generated when you created your private key.
    4. In Selected OAuth Scopes, add the following permissions:
      1. Manage user data via APIs (api)
      2. Perform requests at any time (refresh_token, offline_access)
  5. Click Save.
  6. On the resulting page, click Manage.
  7. On the app page, in the Profiles section, click Manage Profiles.

Retrieve your consumer_key from the Connected App

  1. Within Salesforce, click App Manager in the Apps navigation sidebar.
  2. Find the connected app created in the previous section.
  3. On the app’s row, click on the drop-down menu and select View.
  4. Copy the Consumer Key from the API (Enable OAuth Settings) section. You’ll need the Consumer Key when configuring the Salesforce Notifier Block.

External Client App

Prerequisites:

Generate the private key and certificate

  1. Create a private key (salesforce.key) and self-signed certificate (salesforce.crt) for JWT signing.
openssl req -x509 -sha256 -nodes -days 36500 -newkey rsa:2048 -keyout salesforce.key -out salesforce.crt
  1. 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
  1. Paste the private key into a secure text file and save it. You'll paste it into the Salesforce Notifier Block in Hyperscience.

Create the External Client App

  1. Log in to Salesforce and go to Setup.
  2. In the Quick Find box, enter “External Client Apps”, then select External Client App Manager.
  3. Click New External Client App.
  4. In the Basic Information section:
    1. Enter the app name (e.g., Hyperscience Integration).
    2. Enter a contact email and description.
  5. In the API (Enable OAuth Settings) section:
    1. Check Enable OAuth Settings.
    2. In the Callback URL field, enter “http://localhost”.
    3. Select Use digital signatures and upload the salesforce.crt file generated earlier.
    4. In the Selected OAuth Scopes field, add:
      • Manage user data via APIs (api)
      • Perform requests at any time (refresh_token, offline_access)
  6. Click Save.

Configure app policies

  1. On the resulting page, under Policies, click Edit.

  2. Click Policies to access the policy settings.

  3. In the OAuth Policies section:

    • Permitted Users: Ensure that Admin approved users are pre-authorized is selected.
  4. Select the desired user profile / permission set (i.e., the Hyperscience Permission Set created previously).

  5. Click Save.

Note: Salesforce sometimes requires the openid scope to be added explicitly if JWT authentication is used for user identity. If authentication fails, add the openid scope, as well.

Configure the Salesforce Notifier Block

  1. Log in to your Hyperscience instance.
  2. Go to Flows, and click on the name of the flow you want to add the Salesforce Notifier Block to.
  3. Click Edit Flows.
  4. In Flow Studio, click Outputs.
  5. Click Add, and select Salesforce Notifier Output Block.
  6. Configure the settings described in the Block settings table in this article.