Action types

Content Hub supports the following action types.

Action scripts

Action scripts execute a predefined script.

API call

You use API call actions to make a call to any external API. These actions allows for bulk execution.

If you select API call from the Type drop-down menu, fill in the following fields.

Field name

Description

Mandatory

Method

API call actions support three types of HTTP methods:

  • POST

  • PUT

  • GET

No

API URL

A valid URI. This value can also be resolved from a setting. To resolve the API URL from an environment-specific setting, use the following format:

RequestResponse
{<SETTING_CATEGORY>.<SETTING_NAME>.<SETTING_PROPERTY>}

Yes

Timeout

A timeout to the API call, after which the call fails if no response is available.

Note

The timeout values in the list are expressed in seconds.

No

Headers

Request headers can have dynamic values pulled from the trigger context. When a CREATE or UPDATE action is triggered, the context contains the entity's property values and relation identifiers. When a DELETE action is triggered, the context is empty but all the available information is sent via the standard headers.

Tip

Request headers can be used for authenticating using the API.

No

Values

The syntax for context variables is the same as for display templates, so placing, for example, {Title} in the value field pulls the value of the entity's Title property. When using a relation name, the value contains the target entity identifier. In both cases, when multiple values are available, the | character is used as a separator. When using a self-relation, the resolved value has the following format:

<PARENT_VALUE1>|<PARENT_VALUE2>; <CHILD_VALUE1>|<CHILD_VALUE2>

When placing these in the message body, values are appended to a top- level property named context.

Note

The following restrictions apply to the headers and values collections:

  • Headers - 64 KB

  • Values - 256 KB

If either collection exceeds the threshold, the request will not be executed and the failed attempt will be recorded in the Action audit log.

No

Azure event hub

You use Azure event hub actions to add headers to your request. If you select Azure event hub from the Type drop-down menu, fill in the following fields.

Field name

Description

Mandatory

Connection string

Connection string for the Azure event hub. You can set the connection string using fixed values, or you can resolve it from a setting.

Yes

EventHub

Name of the event hub. To resolve the connection string or the EventHub from an environment-specific setting, use the following format:

RequestResponse
{<SETTING_CATEGORY>.<SETTING_NAME>.<SETTING_PROPERTY>}

Example:

RequestResponse
{Actions.Event.connectionString}
{Actions.Event.eventHub}
Important

Properties are case-sensitive and don't support periods. Request headers and variables don't support resolving values from settings.

Yes

Headers

Message headers can have dynamic values pulled from the trigger context. When a CREATE or UPDATE action is triggered, the context will contain the entity's property values and relation identifiers. When a DELETE action is triggered, the context is empty.

No

Values

The syntax for context variables is the same as for display templates, so placing, for example, {Title} in the value field will pull the value of the entity's Title property. When using a relation name, the value will contain the target entity identifier. In both cases, when multiple values are available, the | character is used as a separator. When using a self-relation, the resolved value has the following format:

<PARENT_VALUE1>|<PARENT_VALUE2>; <CHILD_VALUE1>|<CHILD_VALUE2>

You can also add message body values. The syntax is the same as for headers and results in placing the defined values into a property called context inside the message body.

No

Azure service bus

You use Azure service bus actions to add headers to your request. These actions allow for bulk execution.

If you select Azure event hub from the Type drop-down menu, fill in the following fields.

Field name

Description

Mandatory

Connection string

Connection string for the Azure event hub. You can set the connection string and the destination using fixed values, or you can resolve it from a setting.

Yes

Destination type

Azure service bus actions support two types of destinations:

  • Queue - queue name used for consuming messages.

  • Topic - topic and subscription name used for consuming messages.

No

Destination

The destination of the connection. To resolve the connection string or the destination from an environment-specific setting, use the following format:

RequestResponse
{<SETTING_CATEGORY>.<SETTING_NAME>.<SETTING_PROPERTY>}

Example:

RequestResponse
{Actions.Event.connectionString}
{Actions.Event.destination}

Yes

Headers

Message headers can have dynamic values pulled from the trigger context. When a CREATE or UPDATE action is triggered, the context contains the entity's property values and relation identifiers. When a DELETE action is triggered, the context is empty.

No

Values

The syntax for context variables is the same as for display templates. For example, placing {Title} in the value field pulls the value of the entity's Title property. When using a relation name, the value will contain the target entity's identifier. In both cases, when multiple values are available, the | character is used as a separator. When using a self-relation, the resolved value has the following format:

RequestResponse
<parent_value1>|<parent_value2>; <child_value1>|<child value2> 

You can also add message body values. The syntax is the same as for headers and results in placing the defined values into a property called context inside the message body.

Note

The following restrictions apply to the headers and values collections:

  • Headers - 64 KB

  • Values - 256 KB

If either collection exceeds the threshold, the request will not be executed and the failed attempt will be recorded in the Action audit log.

M Azure service bus

You use M Azure Service Bus actions to send data to an internal service bus provided by Content Hub. The connection string is automatically provided. If you select M Azure service bus from the Type drop-down menu, fill in the following fields.

Field name

Description

Mandatory

Destination type

M Azure service bus actions support two types of destinations:

  • Queue - queue name used for consuming messages.

  • Topic - topic and subscription name used for consuming messages.

Hub in

This connection string allows write operations. Click Copy link to copy the endpoint link.

No

Hub out

This connection string allows read-only operations. Click Copy link to copy the endpoint link.

No

Headers

Message headers can have dynamic values pulled from the trigger context. When a CREATE or UPDATE action is triggered, the context contains the entity's property values and relation identifiers. When a DELETE action is triggered, the context is empty.

No

Values

The syntax for context variables is the same as for display templates. For example, placing {Title} in the value field fetches the value of the entity's Title property. If the specified property is multilingual, an object is returned containing all cultures and their respective values.

When using a relation name, the value must contain the identifier of the target entity.

In both cases, when multiple values are available, the | character is used as a separator. When using a self-relation, the resolved value has the following format:

<parent values separated with '|'> ; <child values separated with '|'>

You can also add message body values. The syntax is the same as for headers, and requires placing the defined values into a property called context inside the message body.

Note

The following restrictions apply to the headers and values collections:

  • Headers - 64 KB

  • Values - 256 KB

If either collection exceeds the threshold, the request will not be executed and the failed attempt will be recorded in the Action audit log.

No

You use a Print entity generation action with a print template to generate a PDF file from a list of entities. If you select Print entity generation from the Type drop-down menu, fill in the following fields.

Field name

Description

Mandatory

Definition

Entity definition that you want to print.

Yes

Template

Predefined print template that you want to use.

Yes

Reporting channel

You use a Reporting channel action to log an entry to the system's reporting pipeline, which you can view from Manage > Reporting logs. For an example, see Track products created.

Important

To create charts containing the events logged in the reporting channel, add these events to the PredefinedEventTypes setting.

Start state machine

You use a Start state machine action to automatically start a State flow.

To configure the Start state machine action, specify which State flow this action starts by clicking Plus iconAdd next to State flow. You can only select a single state flow.

Do you have some feedback for us?

If you have suggestions for improving this article,