younifyd
Menu

Update Macro

Update a macro

PUT/api/macros/{id}

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the Update Macro action (under Macros).
  3. Fill in the fields below, then reference the result from later steps as {{updateMacro.response.data}}.

Request

Path parameters

idintegerrequired

The ID of the macro to update.

Request body

Enter the body as JSON in the step's Body field.

external_idstring | null

External ID of the macro in a foreign system. This field is not used by Gorgias, feel free to set it to your own value.

namestring

The name of the Macro. Tips: choose a name that can be easily searched.

intentstring | null

The intention of the macro should be used for.

One ofdiscount/requestexchange/requestexchange/statusfeedbackorder/damagedorder/cancelorder/changeorder/wrongother/no_replyother/questionother/thanksproduct/recommendationproduct/questionrefund/requestrefund/statusreturn/requestreturn/statusshipping/changeshipping/delivery-issueshipping/policyshipping/statusstock/requestsubscription/cancelsubscription/change

languagestring | null

The language of the macro in ISO 639-1 format.

actionsarray<object>

A list of [actions](#the-macroaction-object) to be applied on tickets.

Default []

argumentsobjectrequired

Parameters of the action. These parameters vary according to the name of the action.

descriptionstring | null

Description of what the action does.

namestringrequired

The name of the action.

titlestringrequired

The title of the action.

typestring

The type of action.

One ofsystemuser

json
{
  "external_id": "CUS-324512",
  "name": "Order status inquiry",
  "intent": "discount/request",
  "language": "en",
  "actions": [
    {
      "arguments": {
        "tags": "question, order-status"
      },
      "name": "addTags",
      "title": "add tags",
      "type": "user"
    },
    {
      "arguments": {
        "body_html": "<div>Hi {{ticket.customer.firstname}},</div><br><div>Your order has been delivered.</div>",
        "body_text": "Hi {{ticket.customer.firstname}},\n\nYour order has been delivered."
      },
      "name": "setResponseText",
      "title": "add tags",
      "type": "user"
    }
  ]
}

Response

Returns 202 with an object. Read it in later steps with {{updateMacro.response.data.<field>}}.

idinteger

ID of the macro.

external_idstring | null

External ID of the macro in a foreign system. This field is not used by Gorgias, feel free to set it to your own value.

namestring

The name of the Macro. Tips: choose a name that can be easily searched.

intentstring | null

The intention of the macro should be used for.

One ofdiscount/requestexchange/requestexchange/statusfeedbackorder/damagedorder/cancelorder/changeorder/wrongother/no_replyother/questionother/thanksproduct/recommendationproduct/questionrefund/requestrefund/statusreturn/requestreturn/statusshipping/changeshipping/delivery-issueshipping/policyshipping/statusstock/requestsubscription/cancelsubscription/change

languagestring | null

The language of the macro in ISO 639-1 format.

usageinteger

How many times the macro was applied on a ticket.

Default 0

actionsarray<object>

A list of [actions](#the-macroaction-object) to be applied on tickets.

Default []

argumentsobjectrequired

Parameters of the action. These parameters vary according to the name of the action.

descriptionstring | null

Description of what the action does.

namestringrequired

The name of the action.

titlestringrequired

The title of the action.

typestring

The type of action.

One ofsystemuser

created_datetimestring | null

When the macro was created.

updated_datetimestring | null

When the macro was last updated.

archived_datetimestring | null

When the macro was archived.

uristring

URI of the macro

json
{
  "id": 23453,
  "external_id": "CUS-324512",
  "name": "Order status inquiry",
  "intent": "discount/request",
  "language": "en",
  "usage": 58392,
  "actions": [
    {
      "arguments": {
        "tags": "question, order-status"
      },
      "name": "addTags",
      "title": "add tags",
      "type": "user"
    },
    {
      "arguments": {
        "body_html": "<div>Hi {{ticket.customer.firstname}},</div><br><div>Your order has been delivered.</div>",
        "body_text": "Hi {{ticket.customer.firstname}},\n\nYour order has been delivered."
      },
      "name": "setResponseText",
      "title": "add tags",
      "type": "user"
    }
  ],
  "created_datetime": "2019-11-23T15:59:41.966927",
  "updated_datetime": "2020-01-30T11:04:34.345123",
  "archived_datetime": "2019-11-23T15:59:41.966927",
  "uri": "string"
}

Need more? See the Gorgias guide for connection setup and behaviour shared by every action.