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:
Property | Description | Type |
---|---|---|
dyType | Must be "message-optin-v1" | String |
cuidType | Possible values: "email" "external" | String |
plainTextEmail Mandatory for cuidType: "email" | A valid plain text email address. Use either plainTextEmail OR externalId, not both. This API uses plain text email addresses because we use the addresses for triggered emails and audience exports. Hashing only works one way, and PII data can't be decrypted. | 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 plain-text email address
DY.API("event", {
name: "Message Opt In",
properties: {
dyType: "message-optin-v1",
cuidType: "email",
plainTextEmail:"[email protected]"
}
});
Example: Implementation via script using an external ID
DY.API("event", {
name: "Message Opt In",
properties: {
dyType: "message-optin-v1",
cuidType: "external",
externalId:"852456456"
}
});