Attribute Data Type: String

Attribute Data Type: String

by Community Manager ‎08-02-2018 10:43 AM - edited ‎08-03-2018 11:22 AM (313 Views)

This article explains how to use the data type string in the Universal Data Hub (UDH). Strings are used to store text values.

In this article:

Table of Contents Placeholder


Strings are used in the data layer and in the UDH to store text values. For example, strings are used for customer information such as First Name and Postal Code, order information such as Order ID and Shipping Method, or site information such as Site Section or Site Language. 

String attribute values have a maximum length of 1,000 characters.

String Enrichments

The following enrichments are available to string attributes.

Set String

This enrichment sets the value of a string attribute, either from a constant value you provide or from the value of another string attribute. The source values can only be a string, iQ variable, or Omnichannel attribute.

Attribute Name: customer_type

Starting Value  ""
Enriched With  "unknown"
Resulting Value  "unknown"

Split String

This enrichment allows you to set multiple values based on a distribution percentage. Each value you set also has a percentage setting. There can be multiple value/percentage entries, but the distribution must total 100%. The distribution is based on a random number generator, so smaller samples might not match the distribution, but as more values are assigned the distribution ratio will become more accurate. The source values can only be a string, iQ variable, or Omnichannel attribute.

In this example an attribute named test_group is used to segment users into two equal groups (50/50), one named "GroupA" and the other "GroupB". This attribute can then be used to identify activity associated with each group.


Attribute Nametest_group

Starting Value  ""
Resulting Value 50%  - "GroupA"
50% -  "GroupB"

See also: Enrichment Example: Split String

Lowercase String

This enrichment will lowercase the current value of the string attribute.

Attribute Nameemail_address

Starting Value  ""
Resulting Value  ""

Join Attributes

This enrichment joins multiple values with a specified delimiter to form a single text value. The delimiter can one or more characters. For example, you could join the first_name and last_name attributes with a single space delimiter to create full_name attribute. You could also create a structured page hierarchy value by combining site_section, page_category, and other page level attributes.


Attribute Namepage_path

Starting Value  ""
Enriched With Attribute 1: site_region="en-us"
Attribute 2: site_section="Electronics"
Attribute 3: category_name="Tablets"
Delimiter: ":"
Resulting Value  "en-us:Electronics:Tablets"

Remove String

This enrichment removes the entire value from the attribute.

Starting Value  "Jane Smith"
Resulting Value  ""