Attribute types
Overview
A number of types of attribute are supported by RPI. Each is summarized below.
Database Column Attribute
This attribute type exposes a specific column in a table within the data warehouse or an auxiliary database.
Exists in Table Attribute
The Exists in table attribute represents that a matching record exists in a joined table in the data warehouse or an auxiliary database. Typically, exists in table attributes are used to exclude records that exist within suppression tables. For example, if a selection rule's resolution level is set to customer, an Exists in table attribute representing customers' existence in a suppression table could be added to the rule as a criterion and set to be excluded. When the rule is run, customers that exist within the suppression table are not counted. The specifics of how the customer and suppression tables are linked are defined by a join.
Flag Attribute
The flag attribute type exposes a Y/N flag. Determination of whether the flag is set to Y or N for a particular record is carried out by checking whether the record in question is counted by an associated selection rule.
For example, suppose a selection rule—“Bought this year”—is created that counts only those customers who have bought a product this year. To make life easier, you might choose to create a “Purchased recently” flag attribute with a Customer target table. By associating the flag attribute with the “Bought this year” rule, you create a Y/N indicator on the customer’s record that is set to Y if he or she has made a purchase this year, or N if not.
Aggregation Attribute
An aggregation attribute allows data related to a record to be aggregated and treated as if a field within that record.
For example, assume that we have a customer table, and a related order table. Order is related to customer – a single customer, with a record in the customer table, may have several orders, each of which is represented by a record in the order table. An aggregation attribute can be used to aggregate the customer’s order data against the customer record—a “Number of orders” attribute could be created to count the number of orders placed by each customer. Equally, a “Total orders value” or “Average order value” attribute could be created.
Function Attribute
A function attribute allows a function to be applied to an existing data item. The resultant attribute may then be used when creating a criterion.
For example, take a function attribute that performs the Month function on a customer’s date of birth to obtain just the month component of that data item. The function attribute could then be used to retrieve only those customers with a birthday in a given month
Banding Attribute
A banding attribute allows you to expose an existing attribute as a series of discrete or value range bands. For example, you might choose to expose an existing raw Income attribute as a banding attribute, thus:
$0 - $20,000: Low income
> $20,000 and < $70,000: Medium income
>= $70,000: High income
Map Item Attribute
A Map item attribute allows you to access data within an element contained within a map field value and indexed via a key.
As an example, consider the following map field value: '{'Map1': 1, 'Map2': 4}'
A Map Item attribute allows exposure of e.g. the data element indexed above using the key “Map2”. In the preceding example, this would result in the value “4”.
SQL Expression Attribute
A SQL expression attribute allows you to expose a valid SQL expression as an attribute. For example, you might want to concatenate existing First Name and Last Name attributes into a Full Name, thus: FirstName + ' ' + LastName
Model Project Attribute
A model project attribute provides access to the outputs of a model project. Model project attributes can be used in content and file exports, but cannot be used to build criteria in selection rules.
Parameter Attribute
A parameter attribute allows you to personalize content, e.g. within an email offer, using parameters posted in a JSON package to a queue listener. Another context in which parameter attributes can be passed to RPI is at the submission of a web form that has been configured with an interaction and queue listener.
For more information, please see the Interaction and Asset Designer documentation.