Message Opt-out
Reports that a user opted out of receiving Reconnect messages.
API-based (server-side) event: Reconnect push notifications only
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-optout-v1" | String |
pushID | Push token retrieved from Firebase | String |
Example of API event
{
"user": {
"dyid": "-4350463893986789401",
"dyid_server": "-4350463893986789401"
},
"session": {
"dy": "ohyr6v42l9zd4bpinnvp7urjjx9lrssw"
},
"events": [
{
"name": "Push Opt-Out",
"properties": {
"dyType": "message-optout-v1",
"pushID": "100"
}
}
]
}
Example of event for API-only type section
{
"user": {
"id": "john_123"
},
"sessionId": "iquahngaishe2koh",
"events": [
{
"name": "Push Opt-Out",
"properties": {
"dyType": "message-optout-v1",
"pushID": "100"
}
}
]
}
Go to the API reference for the Events endpoint to learn more.
Script-based (client-side) event: Reconnect email messages only
We strongly recommend that you manage your opted-in email users via feed, not script event.
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-optout-v1" | String |
cuidType | Possible values: "email" "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: "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 Out",
properties: {
dyType: "message-optout-v1",
cuidType: "external",
externalId:"852456456"
}
});
Updated 3 months ago