Adding Attributes to your project

Before you can target using Attributes, some setup work may be required, and some steps must be performed by your mobile and web developers.

There is no setup required for Default and NPS survey Attributes. You can go straight to Targeting your audience using Attributes. For Predefined and Custom Attributes, you must add them to your project before you can set them on your audience.

You can add up to 250 Attributes per project.

Adding Text, Number, and Date Attributes

  1. Go to Audience, then Attributes, then Attribute List.
  2. Select Create Attribute.
  3. Search for the Attribute you want to add. If it matches a Predefined Attribute, select from the results. Results do not include Predefined Attributes that have been archived or already added.
  4. Complete the fields:
    FieldDescriptionConfiguration
    Attribute IDThe key that Airship uses to reference the Attribute in the SDKs and API. Letters, numbers, and underscores only, 128 characters maximum. Cannot be edited for Predefined Attributes.Enter text.
    NameA human-friendly name to help you organize and identify your Attributes in the dashboard. Accepts all characters, 64 characters maximum.Enter text.
    TypeDetermines the format of the Attribute value: Text, Number, or Date. Cannot be edited for Predefined Attributes.Select a type.
     Important

    • Names and IDs must be unique.
    • Attribute IDs are case sensitive. If your Attributes exist in an external system, make sure they are always the same case in both systems.
    • We recommend using lowercase characters with underscores for Attribute IDs. For example, my_text_attribute.
    • You cannot edit a Custom Attribute’s ID or type after saving.

  5. Select Add.

Adding JSON Attributes

When adding a JSON Attribute, you must define the object’s data structure in a schema. An object is a collection of properties defined as key-value pairs. The values can be strings, numbers, booleans, objects, or arrays. An array is an ordered collection of values. A JSON object allows for nested objects and arrays, so it can contain an array of properties, and those properties can themselves be objects containing more properties and arrays of properties.

You can manually enter a schema or automatically generate a schema by uploading a sample .json file. For upload:

  • The value data determines the value types and will be removed.
  • Array value type is determined based on the first element in an array, so when using an array with more than one type, the array is converted to a single type based on the first element. For example, the array ["hi", true, 3] will create an array of strings.
  • Empty arrays, objects without keys, and keys with empty arrays or objects will be ignored.

You can assign any property a more readable name, like “Flight number” or “Reservation code”, as an alias. When creating a SegmentA grouping of audience members selected by unique or shared identifiers. Multiple identifiers can be combined within a segment. targeting a JSON Attribute, you can select the alias from a menu instead of having to locate the property within the JSON schema. Aliases are supported in the dashboard only.

  1. Go to Audience, then Attributes, then Attribute List.

  2. Select Create Attribute.

  3. Complete the fields:

    FieldDescriptionConfiguration
    Attribute IDA portion of the key that Airship uses to reference the Attribute in the SDKs and APIs. Letters, numbers, and underscores only, 128 characters maximum.Enter text.
    NameA portion of the key that Airship uses to reference the Attribute in the SDKs and APIs. The name is also used help you organize and identify your Attributes in the dashboard. Letters, numbers, and underscores only, 64 characters maximum.Enter text.
    TypeDetermines the format of the Attribute value.Select JSON.
     Important

    • Names and IDs must be unique.
    • Attribute IDs are case sensitive. If your Attributes exist in an external system, make sure they are always the same case in both systems.
    • We recommend using lowercase characters with underscores for Attribute IDs. For example, my_text_attribute.
    • You cannot edit a Custom Attribute’s ID or type after saving.

     Tip

    You can select Add now to save the Attribute, then edit and set up the schema later.

  4. (To automatically generate a schema) Select Upload, then upload your sample .json file.

  5. (To manually create a schema) Select Create schema.

  6. Edit the schema:

    OptionConfiguration
    Add a propertySelect the plus icon, enter a name, select a value type, then select the check mark. You must also select a value type for each array.
    Remove a property or objectHover over the item, then select the trash can icon.
  7. (Optional) Create aliases:

    1. Under Aliases, select the plus icon.
    2. Enter a name for the alias.
    3. Select a property in the schema. Its path will appear next to the alias.
    4. (Optional for arrays in the path) Select First or Last to specify the first or last item in the array. Defaults to Any.
    5. Select the check mark to save.
    6. Repeat for additional aliases.
  8. Select Save JSON Schema.

  9. Select Add.