- [HTTP request](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.request_body)
- [Response body](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.response_body)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.TriggerActionResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#body.aspect)
- [TriggerActionPayload](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TriggerActionPayload)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TriggerActionPayload.SCHEMA_REPRESENTATION)
- [ActionInput](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ActionInput)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ActionInput.SCHEMA_REPRESENTATION)
- [InputValue](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#InputValue)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#InputValue.SCHEMA_REPRESENTATION)
- [TextInputValue](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TextInputValue)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TextInputValue.SCHEMA_REPRESENTATION)
- [ChoiceInputValue](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ChoiceInputValue)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ChoiceInputValue.SCHEMA_REPRESENTATION)
- [CheckboxInputValue](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#CheckboxInputValue)
  - [JSON representation](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#CheckboxInputValue.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#try-it)

Start an action. The action can be requested by merchants in third-party application. Before merchants can request the action, the third-party application needs to show them action specific content and display a user input form. You can submit an allowlist request in the [Shopping API Support Form](https://support.google.com/merchants/contact/shopping_api_support_form) under "What is the issue/question?" to get access to this feature.

The action can be successfully started only once all `required` inputs are provided. If any `required` input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#InputField.FIELDS.id` for all problematic field together with translated, human readable error messages that can be shown to the user.

### HTTP request

`POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/triggeraction`

### Path parameters

| Parameters ||
|---|---|
| `merchantId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the merchant's account. |

### Query parameters

| Parameters ||
|---|---|
| `languageCode` | `string` Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If not set, the result will be in default language `en-US`. |

### Request body

The request body contains an instance of `https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TriggerActionPayload`.

### Response body

Response informing about the started action.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "message": string } ``` |

| Fields ||
|---|---|
| `message` | `string` The message for merchant. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/content`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## TriggerActionPayload

The payload for the triggered action.

| JSON representation |
|---|
| ``` { "actionContext": string, "actionInput": { object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ActionInput`) } } ``` |

| Fields ||
|---|---|
| `actionContext` | `string` Required. The `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#BuiltInUserInputAction.FIELDS.action_context` from the selected action. The value is obtained from rendered issues and needs to be sent back to identify the `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#FIELDS.builtin_user_input_action` that is being triggered. |
| `actionInput` | ``object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ActionInput`)`` Required. Input provided by the merchant. |

## ActionInput

Input provided by the merchant.

| JSON representation |
|---|
| ``` { "actionFlowId": string, "inputValues": [ { object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#InputValue`) } ] } ``` |

| Fields ||
|---|---|
| `actionFlowId` | `string` Required. `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#ActionFlow.FIELDS.id` of the selected action flow. |
| `inputValues[]` | ``object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#InputValue`)`` Required. Values for input fields. |

## InputValue

Input provided by the merchant for input field.

| JSON representation |
|---|
| ``` { "inputFieldId": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "textInputValue": { object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TextInputValue`) }, "choiceInputValue": { object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ChoiceInputValue`) }, "checkboxInputValue": { object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#CheckboxInputValue`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `inputFieldId` | `string` Required. `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#InputField.FIELDS.id` of the corresponding input field. |
| Value provided by the merchant. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `textInputValue` | ``object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#TextInputValue`)`` Value for `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#TextInput` field. |
| `choiceInputValue` | ``object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#ChoiceInputValue`)`` Value for `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#ChoiceInput` field. |
| `checkboxInputValue` | ``object (`https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction#CheckboxInputValue`)`` Value for `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#CheckboxInput` field. |
| End of mutually exclusive fields. ||

## TextInputValue

Value for `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#TextInput` field.

| JSON representation |
|---|
| ``` { "value": string } ``` |

| Fields ||
|---|---|
| `value` | `string` Required. Text provided by the merchant. |

## ChoiceInputValue

Value for `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#ChoiceInput` field.

| JSON representation |
|---|
| ``` { "choiceInputOptionId": string } ``` |

| Fields ||
|---|---|
| `choiceInputOptionId` | `string` Required. \[Id\]\[InputField.ChoiceInput.id\] of the option that was selected by the merchant. |

## CheckboxInputValue

Value for `https://developers.google.com/shopping-content/reference/rest/v2.1/Action#CheckboxInput` field.

| JSON representation |
|---|
| ``` { "value": boolean } ``` |

| Fields ||
|---|---|
| `value` | `boolean` Required. True if the merchant checked the box field. False otherwise. |