Reports that a user opted out of receiving messages.

Mark individual user email addresses to receive or not receive triggered emails. The email recipient list is managed by Dynamic Yield using these events.

🚧

This event is currently available for script implementation only. API implementation is coming soon.

Parameters

  • name: Human-readable name, not used to identify an event type
  • properties: A container for the event properties as specified in the following table:
PropertyDescriptionType
dyTypeMust be "message-optout-v1"String
cuidTypePossible values:
"he"
"external"
String
hashedEmail
Mandatory for cuidType: "he"
SHA256 hash of the plain-text email in lower case.

Use either hashedEmail OR externalId, not both.
String
externalId
Mandatory for cuidType: "external"
The external ID used to identify the user. Your ESP must be able to recognize this ID and map it to an email address.

Use either hashedEmail OR externalId, not both.

Note: The external ID type is supported only by custom ESP and Emarsys integrations (and not by SendGrid or Responsys, for example)
String

Example: Implementation via script using a hashed email address

DY.API("event", {
  name: "Message Opt Out",
  properties: {
    dyType: "message-optout-v1",
    cuidType: "he",
    hashedEmail: DYO.dyhash.sha256("[email protected]".toLowerCase()) // SHA256 encoding of the lowercase email.
  }
});

Example: Implementation via script using an external ID

DY.API("event", {
  name: "Message Opt Out",
  properties: {
    dyType: "message-optout-v1",
    cuidType: "external",
    externalId:"852456456"
  }
});