Message Opt-in

Reports that a user opted in to receive messages.

🚧

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

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

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-optin-v1"String
cuidTypePossible values:
"email"
"external"
String
hashedEmail
Mandatory for cuidType: "he"
SHA256 hash of the plain-text email in lower case.

Use either plainTextEmail 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 plainTextEmail 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 In",
  properties: {
    dyType: "message-optin-v1",
    cuidType: "email",
    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 In",
  properties: {
    dyType: "message-optin-v1",
    cuidType: "external",
    externalId:"852456456"
  }
});

👍

Go to the API reference for the Events endpoint to learn more.