Standard and Serial Key-Value Pairs standard-and-serial-key-value-pairs

A key-value pair consists of related elements: A key, which is a constant that defines the data set (e.g.: gender, color, price) and a value, which is a variable that belongs to the set (e.g., male/female, green, 100). Destination Builder sends data formatted as key-value pairs.

Basic Key-Value Pairs basic-key-value-pairs

Fully formed, a basic set of key-value pair could look like these:

  • gender = male
  • color = green
  • price > 100

Standard and Serial Key-Value Pairs standard-serial-key-value-pairs

Destinations accept key-value data in standard or serialized format.

  • Standard key-value pairs: Formats destination data into separate key-value pairs. Each key is stated explicitly, even when used again to define a different value.
  • Serialized key-value pairs: Condenses multiple values into a single key-value pair. In a serialized key-value pair, a special indicator separates the values within the key-value set.

Both standard and serialized key-values can contain single or multiple values. The following table provides examples of standard and serial key-value formats.

Formatting
Single Key-Value Pairs
Multiple Key-Value Pairs
Standard
x = 1 & x = 2
x = 1 & x = 2 & y = 3 & y = 4
Serialized
x = 1 ; 2
x = 1 ; 2 & y = 3 ; 4

Delimiters and Separators delimiters-separators

The characters that separate values within and between keys and values are known as delimiters and separators. These become particularly important when you send segments to a destination in a serial format. Serialization lets you pass in multiple values with a single key and combine key-value pairs. Delimiters and separators are defined as follows:

  • Key-value separator: Separates a key and value within a key-value pair.
  • Key-value delimiter: Separates sets of key-value pairs.
  • Serial separator: Separates multiple values within sets of serialized key-value pairs.

Examples examples

With Destination Builder you can format key-value data in several different ways. Let’s take a look at some examples of each type.

Key-Value Pair Examples
Example
Description
Standard single key
X = 1 & X = 2

A simple set of key-value pairs. The example contains these elements:

  • Key: X
  • Values: 1, 2
  • Separator: =
  • Key-value delimiter: &
Multiple key-value pairs (non-serial)
X = 1 & X = 2 & Y = 3 & Y = 4

A set of multiple key-value pairs that pass in values with separate key-value sets. The example contains these elements:

  • Keys: X, Y
  • Values: 1, 2, 3, 4
  • Separator: =
  • Key-value delimiter: &
Serial single key
X = 1 ; 2 ; 3

A key-value set that passes in multiple values with a single key. Because this key has multiple values, it is known as a serialized key-value pair. The example contains these elements:

  • Key: X
  • Values: 1, 2, 3
  • Separator: =
  • Serial separator: semi-colon
Multiple key-value pairs (serial)
X = 1 ; 2 & Y = 3 ; 4

A set of multiple key-value pairs that pass in multiple values on separate keys. The example contains these elements:

  • Keys: X, Y
  • Values: 1, 2, 3, 4
  • Separator: =
  • Delimiter: &
  • Serial separator: semi-colon

Destination Serialization destination-serialized

A serialized destination combines multiple traits into a single string and sends that information to a destination.

Serialized data transmission helps improve efficiency because multiple traits fire sequentially, rather than in parallel. This provides the destination server with enough time to receive, process, and return data before responding to additional requests.

Supported Destinations

In Audience Manager, you can serialize and send data to just about any destination you want to work with. However, before using this feature, you will need to know the destination URL and where to place some required or optional macros. Obtain the information about macro placement from your destination partner. See Destination Macros Defined for more information.

recommendation-more-help
de293fbf-b489-49b0-8daa-51ed303af695