Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 12.7 KB

triggereventrequestdto.md

File metadata and controls

40 lines (35 loc) · 12.7 KB

TriggerEventRequestDto

Example Usage

import { TriggerEventRequestDto } from "@novu/api/models/components";

let value: TriggerEventRequestDto = {
  workflowId: "workflow_identifier",
  payload: {
    "comment_id": "string",
    "post": {
      "text": "string",
    },
  },
  overrides: {
    "fcm": {
      "data": {
        "key": "value",
      },
    },
  },
  to: {
    topicKey: "<value>",
    type: "Subscriber",
  },
};

Fields

Field Type Required Description Example
workflowId string ✔️ The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page. workflow_identifier
payload Record<string, any> The payload object is used to pass additional custom information that could be
used to render the workflow, or perform routing rules based on it.
This data will also be available when fetching the notifications feed from the API to display certain parts of the UI.
{
"comment_id": "string",
"post": {
"text": "string"
}
}
overrides Record<string, Record<string, any>> This could be used to override provider specific configurations {
"fcm": {
"data": {
"key": "value"
}
}
}
to components.To ✔️ The recipients list of people who will receive the notification.
transactionId string A unique identifier for this transaction, we will generate a UUID if not provided.
actor components.Actor It is used to display the Avatar of the provided actor's subscriber id or actor object.
If a new actor object is provided, we will create a new subscriber in our system
tenant components.Tenant It is used to specify a tenant context during trigger event.
Existing tenants will be updated with the provided details.