Contact Association

How to associate Email or SMS Channels to a Contact

Email Channel Association

The Email channel will be associated with a named user if one has already been set at the time the channel is added. If the channel is created prior to a Named User being set, the information and all other data collected will be associated with an Anonymous ContactAirship can set targeting data on a user before the user is associated with your internal ID, i.e., becomes a named user. In this state we refer to the user as an anonymous contact. . The anonymous contact will be set by Airship, and when a new Named User is set, this data will be transferred to it.

When an email address is registered through the SDK, it will be registered for both transactional and commercial emails by default. To change this behavior, you may specify an option to request Double Opt-InA process where users who sign up for messaging must confirm opting in before they can receive messages. for commercial messages.

The Email registration method takes an EmailRegistrationOptions object as a parameter, here’s an example of how to register an Email channel with commercial and transactional opt-in:

JsonMap properties = JsonMap.newBuilder().put("place", "paris").build();
EmailRegistrationOptions options = EmailRegistrationOptions.commercialOptions(commercialDate, transactionalDate, properties);
UAirship.shared().getContact().registerEmail("your@example.com", options);
val properties = JsonMap.newBuilder().put("place", "paris").build()
val options = EmailRegistrationOptions.commercialOptions(commercialDate, transactionalDate, properties)
UAirship.shared().contact.registerEmail("your@example.com", options)

SMS Channel Association

The SMS channel will be associated with a named user if one has already been set at the time the channel is added. If the channel is created prior to a Named User being set, the information and all other data collected will be associated with an Anonymous ContactAirship can set targeting data on a user before the user is associated with your internal ID, i.e., becomes a named user. In this state we refer to the user as an anonymous contact. . The anonymous contact will be set by Airship, and when a new Named User is set, this data will be transferred to it.

When an MSISDNThe mobile phone number of an individual in your Airship audience. Each MSISDN represents an individual mobile device. is registered through the SDK, Airship sends a message to that number, prompting them to opt in. For more information, see the SMS platform documentation: Non-Mobile Double Opt-In.

The SMS registration method takes an SmsRegistrationOptions object as a parameter, here’s an example of how to register a Sms channel:

SmsRegistrationOptions options = SmsRegistrationOptions.options("senderId");
UAirship.shared().getContact().registerSms("yourMsisdn", options);
val options = SmsRegistrationOptions.options("senderId")
UAirship.shared().contact.registerSms("yourMsisdn", options)

Open Channel Association

Open Channels support notifications to any medium that can accept a JSON payload, through either the Airship API or web dashboard.

For more information about Open Channels, see the Open Channels documentation.

The Open channel will be associated with a named user if one has already been set at the time the channel is added. If the channel is created prior to a Named User being set, the information and all other data collected will be associated with an Anonymous ContactAirship can set targeting data on a user before the user is associated with your internal ID, i.e., becomes a named user. In this state we refer to the user as an anonymous contact. . The anonymous contact will be set by Airship, and when a new Named User is set, this data will be transferred to it.

The Open registration method takes an OpenChannelRegistrationOptions object as a parameter, here’s an example of how to register an Open channel:

OpenChannelRegistrationOptions options = OpenChannelRegistrationOptions.options("platformName");
UAirship.shared().getContact().registerOpenChannel("address", options);
val options = OpenChannelRegistrationOptions.options("platformName")
UAirship.shared().contact.registerOpenChannel("address", options)