Named User

A Named User is a proprietary identifier that maps customer-chosen IDs, e.g., CRM data, to Channels. Schemas for managing Named Users, their associations, and updates.

Named User object

The response body for a Named User listing, including tags, channels and attributes associated with the Named User.

Jump to examples ↓

OBJECT PROPERTIES
  • attributes object<Custom and predefined Attributes>REQUIRED

    Attributes associated with a channel or Named User. This object contains predefined attributes that you enable and assign to the channel, or custom attributes that you create and assign.

    This object enumerates predefined attributes, but you can create your own in the Airship dashboard.

  • channels arrayREQUIRED

    Listing of channels associated with the Named User.

  • created stringREQUIRED

    The creation date-time.

  • last_modified stringREQUIRED

    The last modified date-time.

  • named_user_id stringREQUIRED

    A customer-chosen ID that represents a user, e.g., CRM ID. This ID cannot have leading or trailing whitespace.

  • subscription_lists arrayREQUIRED

    A list of subscription list items associated with the Named User.

  • tags object<Tag Group object>REQUIRED

    One or more tag group objects associated with the Named User. See Named User Tags.

    Tags belong to Tag Groups. Tag Groups appear within the tags object for a Named User or the tag_groups object for a channel. See also Device Properties ua_ is a reserved prefix for Airship-specific tag groups.

    A Tag Group has two parts: a “name” string of 1-128 characters, and an array of tags, containing 0-100 tags. Each tag in the array is also a string consisting of 1-128 characters.

  • user_attributes objectREQUIRED

    User attributes consist of three values that are copied from the last channel associated with the Named User.

    OBJECT PROPERTIES
    • ua_country string

      An ISO 3166 two-character country code. Example: “US”.

    • ua_language string

      An ISO 639-1 two-character language code. Example: “en”.

    • ua_local_tz string

      Time zone as a string. Example: “America/Los_Angeles”

Examples

Example Named User

{
  "named_user": {
      "named_user_id": "user-id-1234",
      "created" : "2020-04-08T20:41:06",
      "last_modified" : "2020-05-01T18:00:27",
      "tags": {
        "loyalty program": [
            "silver-member",
            "ten-plus-years",
            "valued-customer"
        ],
        "crm id": [
            "abc-123-def-456"
        ]
      },
      "subscription_lists": [
        {
          "list_ids": ["example_listId-1", "example_listId-5"],
          "scope": "web"
        },
        {
          "list_ids": ["example_listId-2", "example_listId-3"],
          "scope": "app"
        },
        {
          "list_ids": ["example_listId-2"],
          "scope": "web"
        },
        {
          "list_ids": ["example_listId-3"],
          "scope": "email"
        },
        {
          "list_ids": ["example_listId-4"],
          "scope": "sms"
        }
      ],
      "attributes": {
        "item_purchased": "Fur removal tool",
        "cats_name": "Sammy",
        "pets_age": 12
      },
      "user_attributes": {
        "ua_country": "US",
        "ua_language": "en",
        "ua_tz": "America/Los_Angeles"
      },
      "channels": [
        {
            "channel_id": "dceafd02-b852-4305-83df-98b65fa40dd4",
            "device_type": "ios",
            "installed": true,
            "opt_in": true,
            "push_address": "FFFF",
            "created": "2020-04-08T20:41:06",
            "last_registration": "2020-05-01T18:00:27",
            "tags": [
              "meow"
            ]
        }
      ]
  }
}

Named User update payload

At least one of associate, disassociate, tags, or attributes must be provided. If a channel is provided in both associate and disassociate sections, a 400 will be returned.

OBJECT PROPERTIES
  • associate array

    Associate a list of channels or email addresses with the Named User. If the channel_id or email_address is already associated with the Named User, this operation will do nothing.

  • attributes array

    Set or remove attributes on a Named User.

    A single request body may contain set or remove operations, or both. If both set and remove fields are present and the intersection of the attributes in these fields is not empty, then a 400 will be returned.

    If at least one of the attributes included in the request is valid, i.e., at least one attribute exists, Airship returns a 200 with a warning containing a list of attributes that failed to update.

  • disassociate array

    Disassociate a channel or an email address from the Named User.

  • tags object

    Add, remove, or set tags on a Named User. A single request body may contain add and/or remove objects or a single set field. At least one of the add, remove, or set objects must be present in a request.

    A tag must be < 128 characters. A request with one or more tags longer than 128 characters will return a 400 response.

    If at least one of the tags included in the request is valid, i.e., at least one tags exists, Airship returns a 200 with a warning containing a list of tags that failed to update.

    OBJECT PROPERTIES
    • add object<Tag Group object>

      Add the list of tags to the Named User, but do not remove any. If the tags are already present, they are not modified.

      Tags belong to Tag Groups. Tag Groups appear within the tags object for a Named User or the tag_groups object for a channel. See also Device Properties ua_ is a reserved prefix for Airship-specific tag groups.

      A Tag Group has two parts: a “name” string of 1-128 characters, and an array of tags, containing 0-100 tags. Each tag in the array is also a string consisting of 1-128 characters.

    • remove object<Tag Group object>

      Remove the list of tags from the Named User, but do not remove any others. If the tags are not currently present, nothing happens.

      Tags belong to Tag Groups. Tag Groups appear within the tags object for a Named User or the tag_groups object for a channel. See also Device Properties ua_ is a reserved prefix for Airship-specific tag groups.

      A Tag Group has two parts: a “name” string of 1-128 characters, and an array of tags, containing 0-100 tags. Each tag in the array is also a string consisting of 1-128 characters.

    • set object<Tag Group object>

      Set these tags for the Named User; any tags previously associated that are not in this current list are removed.

      Tags belong to Tag Groups. Tag Groups appear within the tags object for a Named User or the tag_groups object for a channel. See also Device Properties ua_ is a reserved prefix for Airship-specific tag groups.

      A Tag Group has two parts: a “name” string of 1-128 characters, and an array of tags, containing 0-100 tags. Each tag in the array is also a string consisting of 1-128 characters.

Used in: