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 |
plainTextEmail Mandatory for cuidType: "email" | The plain text email address (not hashed) | 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. 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",
plainTestEmail: "[email protected]"
}
});
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 14 days ago