Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Notification__save Rules

Requires a signed-in staff user. Needs the `identity__Tenant` `update` permission. Send the `x-tenant` header (the gateway sets it from your API key).

MUTATIONnotification__saveRules(rules: [NotificationRuleInput!]!): [NotificationRuleOutput!]!

Requires a signed-in staff user. Needs the identity__Tenant update permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

rules*

Returns

  1. notification__saveRules
deliveries*
enabled*Boolean!
event*NotificationEvent!

Business event that can trigger a customer or team notification

Value inORDER_CANCELLEDORDER_CONFIRMEDORDER_PLACEDPAYMENT_FAILEDPAYMENT_PAIDREVIEW_INVITEDSHIPMENT_CREATEDSHIPMENT_DELIVEREDSHIPMENT_DELIVERY_FAILEDSHIPMENT_IN_TRANSITSHIPMENT_OUT_FOR_DELIVERYSHIPMENT_RETURNEDSTORE_CUSTOM
Example Request
mutation Notification__saveRules($rules: [NotificationRuleInput!]!) {  notification__saveRules(rules: $rules) {    deliveries {      channel      recipients {        email        name        phoneNumber        role        templateBody        templateSubject        type        userIds      }      templateBody      templateKey      templateSubject    }    enabled    event  }}
Variables
{  "rules": [    {      "deliveries": [],      "enabled": true,      "event": "ORDER_CANCELLED"    }  ]}
Example Response
{  "data": {    "notification__saveRules": [      {        "deliveries": [          {            "channel": "EMAIL",            "recipients": [              {                "email": "string",                "name": "string",                "phoneNumber": "string",                "role": "string",                "templateBody": "string",                "templateSubject": "string",                "type": "CUSTOM",                "userIds": [                  "string"                ]              }            ],            "templateBody": "string",            "templateKey": "string",            "templateSubject": "string"          }        ],        "enabled": true,        "event": "ORDER_CANCELLED"      }    ]  }}