Box Notifier

Overview

Note that the Box Notifier Output Block must be used in conjunction with the Box Listener Input Block. To learn more about this Input Block, see Box Listener.

With our Box Notifier Output Block connections, you can integrate Box as a downstream destination for your extracted Box content data. If you use metadata templates in Box, you can map Hyperscience document fields to fields in your Box metadata templates when setting up Box Notifier Output Block connections. These connections allow Hyperscience and Box to interact seamlessly, providing quicker time to value for our customers.

The Box Notifier Output Block is available in both SaaS and on-premise deployments of the Hyperscience application.

Sample use cases

  • Users can take extracted metadata from Box’s content and map it to the metadata fields on the content itself.

  • Users can take extracted data from Box’s content, map it back to the metadata fields on the content, and also send it downstream for further processing via an HTTP Notifier Block or another Output Block.

Block settings table

In addition to the settings outlined below, you can also configure the settings described in Universal Integration Block Settings

Name

Required?

Description

Private-Key

Yes

The value of the privateKey element in the JWT credentials JSON file.

Passphrase

Yes

The value of the passphrase element in the JWT credentials JSON file.

Public-Key ID

Yes

The value of the publicKeyID element in the JWT credentials JSON file.

Client ID

Yes

The value of the clientID element in the JWT credentials JSON file.

Client Secret

Yes

The value of the clientSecret element in the JWT credentials JSON file.

Enterprise ID

Yes

The value of the enterpriseID element in the JWT credentials JSON file.

Box Metadata Template Key

Yes

The key of the Box metadata template you would like to map Hyperscience fields to.

Static Metadata Fields

Yes

The list of Hyperscience layout fields you want to map to the Box metadata template.

 

To edit the list, click on the text box, and select or deselect fields in the drop-down list that appears. Click outside of the text box to save your selections.

Key For Mapping

No

The Box metadata field key that should be mapped to the Hyperscience field named .

The system creates a Key For Mapping entry for each field in Static Metadata Fields.

JSON For Additional Metadata Fields

No

JSON entries to map any fields not listed in Static Metadata Fields or to change the type of data sent. By default, raw data for each field is sent to Box, but you can also send the normalized values for the fields you specify.

Setting up Box Notifier

1.  Create a Box Custom App with server authentication (JWT).

You can use the same Custom App that you created for your Box Folder Listener connection.

2.  Obtain the metadata template key.

To map your layout's fields to fields in a Box metadata template, you need the template key for that template. You can find it by using Box's List all metadata templates for enterprise endpoint, which retrieves data for all of your enterprise's templates.

  • To use this endpoint, you need an API token for the Box Custom App. For information on obtaining a token, see Box’s Developer Tokens

3.  Obtain the metadata field keys for your metadata template.

To map Hyperscience fields to fields in a Box metadata template, you also need the keys for the fields in that template. You can retrieve these keys by using the template key you obtained in step 2 and Box’s Get metadata template by name endpoint. The endpoint’s response contains a list of the fields and their keys, among other data.

4.  Create the Box Notifier Output Block connection in Hyperscience.

To add a Box Notifier Output Block connection, follow the steps in Managing Connections

5.  Configure the Box Notifier Output Block connection.

In this step, you’ll route documents to output connections and enter information in the connection’s settings. A full list of the connection’s settings can be found in the Block settings table above.

a.  Route documents to the correct output connections.

The fields to be mapped to metadata templates are layout specific, and you can only add one metadata template to each output connection. Therefore, you need to use layout tags and routing filters to ensure your documents are routed to the correct output connections.

To route documents to output connections:

  1. Add a layout tag to each layout whose documents you will be ingesting from Box (e.g., Box Invoice). 

    • For more information on adding layout tags, see Layout Tags.

    • Add a matching routing filter in the Routing Filter field in the layout’s Box Notifier Output Block connection (e.g., has_layout_tag(‘Box Invoice’)).

    • To learn more about routing functions, see Routing of Extracted Data.

You can use the same layout tag for similar layouts (e.g., a few fields are in one layout but not another). To ensure that all possible fields are mapped to metadata templates, add those fields and their mappings to JSON For Additional Metadata Fields, as described in the section below.

b.  Add authentication information.

Using the JSON with your JWT credentials, enter your account information in the Authentication section of the connection’s settings.

c.  Map layout fields to metadata templates.

When setting up a Box Notifier Output Block connection for a layout or a group of layouts, you need to map Hyperscience layout fields to fields in your Box metadata template. 

To map layout fields to a metadata template:

  1. Enter the key of the template you’re mapping layout fields to in Box Metadata Template Key.

  2. The Static Metadata Fields text box contains a list of the fields found in the layout matching the output connection’s routing filter. Click on the box, and make sure the fields you want to map to your metadata template are selected. Click outside the box to save your selections.

  3. The system automatically creates a Key For Mapping text box for each field you selected in the previous step. In each of these text boxes, enter the Box metadata field key of the template field you want to map to the named layout field.

  4. In the JSON For Additional Metadata Fields text box, enter any necessary field mappings that you have not created in the previous step in the following format:

    {
      "HYPERSCIENCE_NAME_1": "box_metadata_field_key_1",
      "HYPERSCIENCE_NAME_2": "box_metadata_field_key_2”
    }

    For example, assume some layouts with the connection’s layout tag contain a SSN field, and you want to map that field to a social_security_number metadata template field in Box. However, SSN doesn’t appear as an option in Static Metadata Fields. To map the field, you would enter the following in JSON For Additional Metadata Fields:

    {
      "SSN": "social_security_number"
    }

    By default, the system sends the raw data for each field to Box. If you want to send the normalized value for any field in Static Metadata Fields or JSON For Additional Metadata Fields, add an entry for the field in JSON For Additional Metadata Fields in the following format:

    {
      "HYPERSCIENCE_NAME_1": {
        "template_field_name": "box_metadata_field_key_1",
        "type": "normalized"
      }
    }

    Note that raw is also a valid value for type, but you would only enter it if you initially set the type to normalized but realized you wanted to change it later. That way, you don’t need to change the structure of the JSON. You can use both JSON structures in JSON For Additional Metadata Fields:

    {
      "HYPERSCIENCE_NAME_1": "box_metadata_field_key_1",
      "HYPERSCIENCE_NAME_2": {
        "template_field_name": "box_metadata_field_key_2",
        "type": "normalized"
      }
    }