AirData App Objects are custom objects that can contain any number of properties of any Variable Type. They are similar to Custom Data Types, except in addition to providing an object structure that can be used to define locally-stored variables, creating an AirData App Object creates the scheme in AirData, allowing for long-term information storage.
AirData App Objects are defined in AirData Builder. To create a new AirData App Object:
- Click the '+' icon to the right of the App Objects section in the Tree.
- Select Add App Object from the menu that appears.
- Rename the App Object by double-clicking the auto-generated App Object name ("Untitled Object") that appears in the Tree and replacing it with a more informative name.
- To add new properties to the App Object, click on the '+' icon that appears to the right of the App Object in the Tree and select the data type of the desired property. Property names can be edited in the same way App Object names can.
Here is an example of an App Object ("Information") with four properties ("name", "phone", "email", and "company"):
In addition to to the properties explicitly defined as part of an App Object, each App Object is also given a another property: __id, which serves as a unique identifier for each App Object instance. A unique __id value is automatically assigned whenever an App Object instance is added to AirData. To display this property more explicitly, add a text property and call it "__id". This will allow the previously-hidden unique identifier of each App Object instance.
All App Objects are assigned unique __id values, even when the property is not explicitly displayed.
Calling an App Object instance based on its __id is valuable when the instance needs to be specific and unique, such as, for example, when declaring which instance will be deleted as part of an AirData Request. Under most other circumstances, it is safe for this unique identifier to be abstracted away, which is why it is not displayed in AirData by default. However, regardless of whether it is explicitly displayed in AirData, it can be used in practice the same way as any other object property.
Once defined, an App Object can be used as a type anywhere a variable can be declared, such as the Variable Tree or as expected input in a Data Flow. To do so, select the relevant object from the options that appear upon selecting objects as the variable type. For example, the following example provides two objects to choose from, "Identity" and "Information":
App Object properties, like the properties of all other objects, can be referenced with dot notation.
To query an AirData App Object, use the AirData Request Data Operation. This allows you to save new App Object instances, update existing App Object instances, and pull lists of information already saved to the App Object to analyze or display as part of your application.
Information structured according to an AirData App Object and saved to AirData will be saved in a Datastore and accessible long after the associated Journey is complete.
Updated 5 months ago