get Function | Vantage CX - get - Vantage Customer Experience

Vantage Customer Experience User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Vantage Customer Experience
Release Number
1.6
Published
October 2023
Language
English (United States)
Last Update
2023-10-26
dita:mapPath
hbt1563223944614.ditamap
dita:ditavalPath
oyf1565965838286.ditaval
dita:id
tmo1562969305444
Product Category
Teradata Applications

Returns the value of one or more attribute values or lists. For a complex attribute, the get function returns a list of complex attribute records.

Specifying Attributes

To specify an attribute when you type a criteria expression, use the following syntax:

 owner.attribute_category.attribute 

where the owner can be any of the following:

  • Channel
  • Corporate
  • Customer
  • Marketing
  • Messaging

For example, an attribute might be identified Customer.demographics.gender where Customer is the owner, demographics is the attribute category, and gender is the attribute.

The following criteria expression returns true when the value of the gender attribute is female.

get(   
   "Customer.demographics.gender"
) == "Female"

Specifying Complex Attribute

A complex attribute category identifies groups of attributes. To specify a complex attribute category for use in criteria expressions, use the following syntax:

Account.complex_attribute_category_name 

You specify the name of the complex attribute category, not the names of the attributes within the complex attribute category. For example, you might have configured a complex attribute category named cart that has the attributes product and price. When the get function returns the contents of Account.cart, the cart complex attribute category can contain any number of groups of product attribute and price attribute.

The following criteria expression returns true when first value for the product attribute in the cart complex attribute category is ToyTruck.

get(
   get("Account.cart", 0)
    "product"
) == "ToyTruck"

Session Modifier for Accessing Session Data

By default, the get function accesses the most current data. The Session modifier enables the get function to access the session data, which is all of the data in the active session. For example, the Session modifier accesses not only the current value for an attribute but all the previous values for that attribute in the session.

For example, suppose that you are tracking the name of each page visited by a customer on your website using a Customer.nav.page attribute. When each page is visited, you can update this attribute value with the page name. At any point in time, this value can be checked to get its current value by using a function like get("Customer.nav.page"). Suppose that the customer first viewed the home page, which has an attribute value of home. Second, the customer viewed the login page, which has an attribute value of login. If you want to know which pages the customer visited within this session, or the specific sequence or pages visited, then you can use the Session keyword to see that information.

The following returns the current value of the page attribute. In our example, this returns login.

get(get("Session.Customer.nav.page"),0) 

Changing 0 to 1 returns the first value before the current value in the session date. In the example, this returns home.

get(get("Session.Customer.nav.page"),1)

The following criteria expression returns true when the value for the Customer.nav.page attribute is HOME. The expression get("Customer.nav.page") with no parameters returns the current value for the attribute.

get(
   "Customer.nav.page"
) == "HOME"

The following criteria expression returns true when the value for the Customer.nav.page attribute is HOME followed by the value CATALOG. The expression get("Session.Customer.nav.page") returns of all of the values for that attribute that have occurred in the entire session.

get(
   "Session.Customer.nav.page",
   0
 ) == "HOME"
 &&
 get(
   "Session.Customer.nav.page",
    1
) == "CATALOG"

In addition to the Session modifier, there are four parameters you can you use with the get function: Message, SessionExtensions, SessionResponses, and SessionServings.

Message Parameter

The function get("Message") returns the message that is currently being evaluated by the Vantage CX criteria engine and includes the following for use in criterion:
  • KEYNAME (message KEYNAME)
  • name (message name)

The following criteria expression gets the current message and returns true when the name is special_offer.

get(
   get("Message"),
    "name"
) == "special_offer"

The following criteria expression sets M to the message key name and returns true when the name is message1.

set("M", get("Message")) &&
get(M, "name") == "message1"

SessionExtensions Parameter

The records returned by get("SessionExtensions") represent an extension of a message by Vantage CX and include the following for use in criterion:
  • KEYNAME (message KEYNAME)
  • messageClass (message group)
  • channel
  • messageStrategy
  • arbitration
  • arbitrationValue
  • strategy
  • objective
The following criteria expression checks if Vantage CX has extended the message to channel c1 one or more times in the session.
count(filter(get("SessionExtensions"), "channel", "c1")) > 1
The following criteria expression checks if Vantage CX has extended the message to messageStrategy recharge one or more times in the session.
count(filter(get("SessionExtensions"), "messageStrategy", "recharge")) > 1

SessionResponses Parameter

The records returned by get("SessionResponses") represent responses to messages extended by Vantage CX and include the following for use in criterion:
  • KEYNAME (message KEYNAME)
  • channel
  • messageStrategy
  • interactionPoint
  • responseLevel
  • responseIsPositive returns true or false (case sensitive)
  • convertedResponseTime
  • implyExtension
  • objective
  • strategy
  • messageClass (message group)
  • strategySequence
  • arbitration
  • arbitrationValue
  • name (message name)

The following criteria expression checks if there have been two or more responses to the message named MSG1.

count(
    filter(
        get("SessionResponses"),
        "name",
        "MSG1"
    )
) >= 2

In the following example, the criteria expression is looking for two or more particular responses (accept) to the message named MSG1.

count(
   filter(
      filter(
         get("SessionResponses"),
          "name",
          "MSG1"
      ),
      "responseLevel",
      "accept"
   )
) >= 2
The following criteria expression checks if there have been two or more responses for any Message in messageStrategy recharge.
count(
    filter(
        filter(
            get("SessionResponses"),
"messageStrategy",
"recharge" ),
        "responseLevel",
    )
)> 2

SessionServings Parameter

The records returned by get("SessionServings") represent servings of a message and extensions of a message by Vantage CX when Imply Extension is set to false and include the following for use in criterion:
  • KEYNAME (message KEYNAME)
  • messageClass (message group)
  • channel
  • messageStrategy
  • arbitration
  • arbitrationValue
  • strategy
  • objective

The following criteria expression checks if Vantage CX has served the message to channel c1 one or more times in the session.

count(filter(get("SessionServings"), "channel", "c1")) > 1

The following criteria expressions checks if Vantage CX has served the message to MessageStrategy recharge one or more times in the session.

count(filter(get("SessionServings"), "messageStrategy", "recharge")) > 1