Skip to main content

EmailEventInput

Email event trigger data for template-based messaging.

Contains all necessary information to trigger an email event through the template engine, including event classification, context data, recipients, and customization options.

input EmailEventInput {
type: EmailEventType!
siteId: Int
orderId: Int
userId: Int
letterId: String
subject: String
content: String
from: EmailSendContactInput
to: [EmailSendContactInput!]
attachments: [Base64FileInput!]
variables: JSONObject
language: String
}

Fields

EmailEventInput.type ● EmailEventType! non-null enum

Classification of the email event being triggered.

Determines the purpose and context of the email, enabling appropriate template selection and content personalization based on the business scenario.

EmailEventInput.siteId ● Int scalar

Legacy site identifier for email context.

Previously used to determine site-specific email configuration, now deprecated as site context is derived from other inputs automatically.

EmailEventInput.orderId ● Int scalar

The id of the order to use when triggering an event of type orderconfirm

EmailEventInput.userId ● Int scalar

User identifier for recipient determination.

Used to identify the email recipient when the user cannot be derived from other context inputs like order or contact information.

EmailEventInput.letterId ● String scalar

Campaign letter identifier for marketing emails.

Required when triggering campaign-type events, references the specific marketing letter or campaign content to be sent.

EmailEventInput.subject ● String scalar

Custom email subject line override.

Provides a specific subject line when it cannot be derived from template configuration or other context inputs, enabling dynamic subject customization.

EmailEventInput.content ● String scalar

Custom email content override.

Provides specific email content when it cannot be derived from template configuration or other context inputs, enabling dynamic content customization.

EmailEventInput.from ● EmailSendContactInput input

Email sender information override.

Specifies the email sender when it cannot be derived from template configuration or other context inputs, enabling flexible sender customization.

EmailEventInput.to ● [EmailSendContactInput!] list input

Primary email recipients override.

Specifies the email recipients when they cannot be derived from other context inputs like user ID or order information, enabling flexible recipient targeting.

EmailEventInput.attachments ● [Base64FileInput!] list input

File attachments for the email.

Base64-encoded files that will be attached to the email message, supporting various file types for comprehensive communication needs.

EmailEventInput.variables ● JSONObject scalar

Template variable data for dynamic content.

JSON object containing key-value pairs that will be used for Handlebars variable substitution in the email template, enabling personalized and context-specific content generation.

Validation: Must be valid JSON format.

EmailEventInput.language ● String scalar

Language code for email localization.

ISO 639-1 language code that determines which language version of the template to use for message generation, enabling multilingual email support.

Member Of

publishEmailEvent mutation