younifyd
Menu

Update Widget

Update a widget

PUT/api/widgets/{id}

Use it in a workflow

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

Request

Path parameters

idintegerrequired

The ID of the widget to update.

Request body

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

contextstring

The context to display this widget in. Supported values are: `ticket`, `customer`, `user`. The value <span style={{color: 'red'}}>`user` has been deprecated</span>, please use `customer` instead.

One ofticketcustomeruserDefault "ticket"

deactivated_datetimestring | null

When the widget was deactivated.

integration_idinteger | null

ID of the integration that the widget's data is attached to. Only used for widgets attached to HTTP integrations. Widgets are the same for all Shopify integrations, but each HTTP integration needs a specific widget.

app_idstring | null

The ID of the 3rd party app that the widget's data is attached to. Used for customer external data widgets.

orderinteger

Order of precedence of the widget. Widgets with lower order are shown first.

Default 0

templateobject

Template to render the data of the widget.

typestring

Type of data the widget is attached to.

One ofbigcommercecustomcustomer_external_datahttpmagento2rechargeshopifysmilestandaloneyotpoklaviyostripewoocommerce

json
{
  "context": "ticket",
  "deactivated_datetime": "2020-12-03T13:00:00.123456",
  "integration_id": 0,
  "app_id": "60b9f144096cf92533e0a14d",
  "order": 3,
  "template": {
    "type": "wrapper",
    "widgets": [
      {
        "path": "account_info",
        "type": "card",
        "title": "account  info",
        "widgets": [
          {
            "path": "account_id",
            "type": "text",
            "title": "account id"
          }
        ]
      }
    ]
  },
  "type": "http"
}

Response

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

idinteger

ID of the widget.

contextstring

The context to display this widget in. Supported values are: `ticket`, `customer`, `user`. The value <span style={{color: 'red'}}>`user` has been deprecated</span>, please use `customer` instead.

One ofticketcustomeruserDefault "ticket"

created_datetimestring (date-time)

When the widget was created.

deactivated_datetimestring | null

When the widget was deactivated.

integration_idinteger | null

ID of the integration that the widget's data is attached to. Only used for widgets attached to HTTP integrations. Widgets are the same for all Shopify integrations, but each HTTP integration needs a specific widget.

app_idstring | null

The ID of the 3rd party app that the widget's data is attached to. Used for customer external data widgets.

orderinteger

Order of precedence of the widget. Widgets with lower order are shown first.

Default 0

templateobject

Template to render the data of the widget.

typestring

Type of data the widget is attached to.

One ofbigcommercecustomcustomer_external_datahttpmagento2rechargeshopifysmilestandaloneyotpoklaviyostripewoocommerce

updated_datetimestring (date-time)

When the widget was updated.

uristring

URI of the widget.

json
{
  "id": 123,
  "context": "ticket",
  "created_datetime": "2020-12-01T13:00:00.123456",
  "deactivated_datetime": "2020-12-03T13:00:00.123456",
  "integration_id": 0,
  "app_id": "60b9f144096cf92533e0a14d",
  "order": 3,
  "template": {
    "type": "wrapper",
    "widgets": [
      {
        "path": "account_info",
        "type": "card",
        "title": "account  info",
        "widgets": [
          {
            "path": "account_id",
            "type": "text",
            "title": "account id"
          }
        ]
      }
    ]
  },
  "type": "http",
  "updated_datetime": "2020-12-02T13:00:00.123456",
  "uri": "string"
}

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

Was this page helpful?