Method: merchantsupport.triggeraction

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.

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 Ids 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 (int64 format)

Required. The ID of the merchant's account.

Query parameters

Parameters
languageCode

string

Optional. Language code IETF BCP 47 syntax 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 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.

TriggerActionPayload

The payload for the triggered action.

JSON representation
{
  "actionContext": string,
  "actionInput": {
    object (ActionInput)
  }
}
Fields
actionContext

string

Required. The context from the selected action. The value is obtained from rendered issues and needs to be sent back to identify the action that is being triggered.

actionInput

object (ActionInput)

Required. Input provided by the merchant.

ActionInput

Input provided by the merchant.

JSON representation
{
  "actionFlowId": string,
  "inputValues": [
    {
      object (InputValue)
    }
  ]
}
Fields
actionFlowId

string

Required. Id of the selected action flow.

inputValues[]

object (InputValue)

Required. Values for input fields.

InputValue

Input provided by the merchant for input field.

JSON representation
{
  "inputFieldId": string,

  // Union field value can be only one of the following:
  "textInputValue": {
    object (TextInputValue)
  },
  "choiceInputValue": {
    object (ChoiceInputValue)
  },
  "checkboxInputValue": {
    object (CheckboxInputValue)
  }
  // End of list of possible types for union field value.
}
Fields
inputFieldId

string

Required. Id of the corresponding input field.

Union field value. Value provided by the merchant. value can be only one of the following:
textInputValue

object (TextInputValue)

Value for text input field.

choiceInputValue

object (ChoiceInputValue)

Value for choice input field.

checkboxInputValue

object (CheckboxInputValue)

Value for checkbox input field.

TextInputValue

Value for text input field.

JSON representation
{
  "value": string
}
Fields
value

string

Required. Text provided by the merchant.

ChoiceInputValue

Value for choice input 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 checkbox input field.

JSON representation
{
  "value": boolean
}
Fields
value

boolean

Required. True if the merchant checked the box field. False otherwise.