Routing of Extracted Data

By default, if you have multiple notification connections enabled in the system, every submission's extracted data is output through each enabled notification connection. In other words, if Hyperscience is connected to multiple downstream systems, each of these systems receives all state-change notifications for all submissions processed through Hyperscience. For many customers, this configuration creates unnecessary notifications. To learn more about these notifications, see our API documentation.

If you're a system administrator, you can use source tags and routing filters to define which downstream systems to route extracted submission data to.

Tag submissions with source tags

You can apply source tags to submissions so that Hyperscience knows where a particular submission came from. These tags can then be used to determine which submissions will be sent to each downstream system. For more details, see Define a routing filter below.

To tag submissions created through a particular connection:

  1. In the application, go to Flows, and click on the name of the flow whose input connection you would like to enter source tags for.

  2. Click on the flow's Input Block, and in the right-hand sidebar that appears, click the pencil icon (  PencilIconBlue.png ) for the connection you want to add source tags for.

  3. Scroll down to "Submission Processing Settings," and in the Source Tags field, enter the source tags that should be added to submissions created through the connection. You can enter multiple tags by separating them with commas.

SourceTagsv30.png

You can also use the source_routing_tag parameter to tag submissions created through the API. To learn more, see our API documentation.

Define a routing filter

Routing filters allows you to configure the state change notifications that should be sent through each notification connection. If you have system administrator privileges, you can define routing filters in the Routing Filter field for a notification connection. This field can be found in the “Payload options” section on the connection's settings. To learn more about these settings, see Universal Integration Block Settings.

If you do not create a routing filter, all state-change notifications will be processed through the given notification connection. If you do create a filter, the expression will be evaluated for each submission processed through the system, and a notification will be sent only if the expression evaluates to true.

Use one or more of the following boolean functions to define your routing filter:

Name

Parameters

Description

Example

has_metadata_dict_key

key

Returns true if the submission's metadata is a dictionary and contains the given key.

has_metadata_dict_key('key')

has_metadata_dict_value

key, value

Returns true if the submission's metadata is a dictionary and contains the given key-value pair.

has_metadata_dict_value('key', 'value')

has_source_routing_tag

tag_name

Returns true if the submission has the given source tag. You can add source tags via the API or connectors as part of the submission-creation process.

has_source_routing_tag('tag_name')

has_layout_tag

tag_name

Returns true if the submission was matched to a layout with the given tag.

has_layout_tag('tag_name')

is_complete

none

Returns true if the submission's status is "Complete."

is_complete()

is_processing

none

Returns true if the submission's status is "Processing."

is_processing()

is_in_supervision

none

Returns true if the submission's status is "Supervision.

is_in_supervision()

When combining functions, you can use parentheses and the logical operators and, or, and not to create your expression.

For example, if the following expression is entered, only Complete state notifications will be processed, and only for those submissions tagged with the source tag san_diego:

has_source_routing_tag('san_diego') and is_complete()

RoutingFilter.png

If you would like to pass multiple parameters for has_metadata_dict_key, has_source_routing_tag, or has_layout_tag, you can include one instance of the function for each parameter you would like to pass.

For example, to filter for submissions with the accounting source tag, the hr source tag, or both, you would enter the following expression:

has_source_routing_tag('accounting') or has_source_routing_tag('hr')

Similarly, if you want to filter for multiple sets of key-value pairs, you can repeat the has_metadata_dict_key function for each pair.