Message Opt-in

Reports that a user opted in to receive Reconnect messages.

👍

New dedicated Opt-in/Opt-out endpoints for Reconnect

Reconnect now has its own Update Reconnect Opt-In and Update Reconnect Opt-Out server-side API events.

If you're already using Message Opt-in or Message Opt-out events, no worries—we'll continue to support them. However, if you're setting up your implementation now, use the dedicated APIs.

Learn more about implementing Reconnect Update events in email and SMS integrations

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:
PropertyDescriptionType
dyTypeMust be "message-optin-v1"String
pushIDPush token retrieved from FirebaseString
channelTypeThe channel the user opted in to: APP_PUSH or WEB_PUSHString

Example of API event

{ 
  "user": { 
  "dyid": "-4350463893986789401", 
  "dyid_server": "-4350463893986789401" 
  }, 
  "session": { 
    "dy": "ohyr6v42l9zd4bpinnvp7urjjx9lrssw" 
   }, 
 "events": [ 
  { 
    "name": "Push Opt-In", 
    "properties": { 
      "dyType": "message-optin-v1", 
      "pushID": "100",
      "channelType": "WEB_PUSH"  
    } 
  } 
 ] 
}

Example of event for API-only type section

{ 
  "user": { 
    "id": "john_123" 
  }, 
  "sessionId": "iquahngaishe2koh", 
  "events": [ 
    { 
      "name": "Push Opt-In", 
      "properties": { 
        "dyType": "message-optin-v1", 
        "pushID": "100" ,
        "channelType": "APP_PUSH" 
      } 
    } 
  ] 
}

👍

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

Script-based (client-side) event: Reconnect email messages only

Mark individual users email addresses to receive or not receive Reconnect 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
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 plaint 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"
  }
});