REST Call Rule
The REST Call rule enables you to make a REST call to an external system from within your BizzStream workflow. When executed, BizzStream sends the current document as it is stored in the database.
When the Save Response option is enabled, BizzStream will attempt to update fields in the document with values from the response of the external system. Fields in the response that are also defined in the document definition will be assigned the response's values. Fields in the response that are not defined in the document definition will be ignored.
How to Add and Configure the REST Call Rule
- Open the desired action in your workflow.
- Navigate to the Rules section and click the
button. - In the configuration pane, select REST Call from the Type dropdown.
- Provide a clear Label and Description.
- Configure the specific properties for the REST call.
- Click Save to finalize the rule setup.
- Click Save in the action properties pane to apply the changes to the action.
Important Considerations
- User Permissions: BizzStream does not consider user permissions when updating the document with data from a REST call response. This means fields to which the user does not have edit permissions may also be updated if included in the REST call response.
- Notifications: External systems can trigger notifications to be displayed to BizzStream users. This is done by including specific fields in the REST call response. This functionality only works when the REST call is part of a user action.
- For example, if the REST call response includes
_errorText: "We could not process this stuff.", BizzStream will display an error notification.
- For example, if the REST call response includes
Internal and External IDs
Documents may contain reference fields that point to other documents. External systems often don't recognize BizzStream's internal IDs. To address this, when a document is sent via a REST call, BizzStream tries to replace internal IDs with external IDs if:
- The referenced document definitions include an
externalIdfield. - The
externalIdfield in the referenced document contains a value.
Conversely, when BizzStream receives a response from an external system with external IDs, it automatically converts them back to internal IDs.
Rule Properties
| Property | Required | Purpose |
|---|---|---|
| URL | Yes | The endpoint or address for the REST API call. |
| Method | Yes | The HTTP method to use for the request (e.g., GET, POST, PUT, DELETE). |
| Header | Yes | Additional headers to include in the request, often used for authentication or content type. |
| Save Response | No | Specifies whether the response from the request should be saved. |