---
title: "Action types"
slug: "action-types"
abstract: "Overview of action types, including scripts, API calls, Azure services, print generation, reporting, and state machine initiation."
---
# Action types

Content Hub supports the following action types.

## Action scripts

Action scripts execute a predefined [script](https://doc.sitecore.com/ch/en/developers/cloud-dev/scripts.html "Scripts").

## API call

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

> [!note]
> API call actions do not support multi-language properties.

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

- Field name: Description
- **Method**: API call actions support three types of HTTP methods:**POST****PUT****GET**
- **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:

```http
{<SETTING_CATEGORY>.<SETTING_NAME>.<SETTING_PROPERTY>}

```

- **Timeout**: A timeout to the API call, after which the call fails if no response is available.NoteThe timeout values in the list are expressed in seconds.
- **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.TipRequest headers can be used for authenticating using the API.
- **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**.NoteThe following restrictions apply to the headers and values collections:Headers - 64 KBValues - 256 KBIf either collection exceeds the threshold, the request will not be executed and the failed attempt will be recorded in the Action audit log.

<details>
<summary>API URL example</summary>

```http
{Actions.ApiCalls.BeeUrl}
{Actions.ApiCalls.RedUrl}

```

When creating a setting within the `Actions` category with the name `ApiCalls`, configure the setting as follows:

```http
{
    "BeeUrl": "https://bee.com",
    "RedUrl": "https://red.com"
}

```

> [!important]
> Properties are case-sensitive and don't support periods. Request headers and variables can't be resolved from settings.

</details>

## 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
- **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.
- **EventHub**: Name of the event hub. To resolve the connection string or the EventHub from an environment-specific setting, use the following format:Example:ImportantProperties are case-sensitive and don't support periods. Request headers and variables don't support resolving values from settings.

```json
{<SETTING_CATEGORY>.<SETTING_NAME>.<SETTING_PROPERTY>}

```
```json
{Actions.Event.connectionString}
{Actions.Event.eventHub}

```

- **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.
- **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.

## 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
- **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.
- **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.
- **Destination**: The destination of the connection. To resolve the connection string or the destination from an environment-specific setting, use the following format:Example:

```json
{<SETTING_CATEGORY>.<SETTING_NAME>.<SETTING_PROPERTY>}

```
```json
{Actions.Event.connectionString}
{Actions.Event.destination}

```

- **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.
- **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: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.NoteThe following restrictions apply to the headers and values collections:Headers - 64 KBValues - 256 KBIf either collection exceeds the threshold, the request will not be executed and the failed attempt will be recorded in the Action audit log.

```http
<parent_value1>|<parent_value2>; <child_value1>|<child value2>

```

## 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:<br><br><ul><li>Queue - queue name used for consuming messages.</li><li>Topic - topic and subscription name used for consuming messages.</li></ul> |  |
| **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.<br><br>When using a relation name, the value must contain the identifier of the target entity.<br><br>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:<br><br>`<parent values separated with '\|'> ; <child values separated with '\|'>`<br><br>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.<br><br>> [!note]<br>> The following restrictions apply to the headers and values collections:<br>> <ul><li>Headers - 64 KB</li><li>Values - 256 KB</li></ul><br>> 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 |

## Print entity generation

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](https://doc.sitecore.com/ch/en/users/content-hub/create-a-print-template.html) 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](https://doc.sitecore.com/ch/en/developers/cloud-dev/track-products-created.html "Track products created").

> [!important]
> To create charts containing the events logged in the reporting channel, add these events to the `PredefinedEventTypes` [setting](https://doc.sitecore.com/ch/en/users/content-hub/settings.html).

## 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 :mdiPlus:**Add** next to **State flow**. You can only select a single state flow.