File Format Macros file-format-macros

Lists the macros you can use to create FTP-based data files. Some macros can be used for all data file fields and rows. Other macros are specific to header and data rows only.

Common Macros common-macros

These macros can be used in any format field. For examples, see File Format Macro Examples.

Macro
Description
ASCII_SOH
A non-printing ASCII character. It indicates the start of a row or a section of content. It can also be used to separate data columns in a file.
DPID
Target Data Provider ID.
MASTER_DPID
User ID Key Data Provider ID.
ORDER_ID
Order / destination ID.
PIDALIAS

An alias for an order / destination ID.

The value for this alias is set in the Foreign Account ID field for a destination (in the Basic Settings section).

SYNC_MODE

Indicates synchronization type. Accepts the following optional variables:

  • full: Full synchronization.
  • iter: Incremental synchronization.
SYNC_TYPE

Indicates data transfer method. Accepts the following optional variables:

  • ftp
  • http
  • s3
TIMESTAMP

A 10-digit, UTC, Unix timestamp.

It can also be formatted as YYYYMMDDhhmmss following Java date/timestamp formatting rules.

Header Field Macros header-field-macros

Macros used in header fields only. For examples, see File Format Macro Examples.

Macro
Description
TAB
Used as a separator, this macro inserts a tab between fields.

Data Row Macros data-row-macros

Macros used in data rows only. For examples, see File Format Macro Examples.

Macro
Description
CLOSE_CURLY_BRACKET
Inserts a closed curly bracket } character.
COMMA
Inserts a comma.
DP_UUID

Data Partner Unique User Identifier . Returns the ID you've assigned to a user/site visitor if that ID has already been synchronized with an Audience Manager device ID.

If the DPID is 0, this macro will return the Audience Manager ID instead of your ID for the user.

DP_UUID_LIST
Returns a list that contains multiple IDs for a data partner. This is useful if you have a large organization with multiple subdivisions or other organizational groups you're allowed to share data with. This macro returns a list of the IDs for those subordinate groups.
DPUUIDS

The output of this macro maps the data provider ID (DPID) to related unique user IDs (DPUUID). This macro must have a formatting string to control its output. Sample output would look similar to the following:

"dpids=dpid1,dpid2,...dpid n|maxMappings= n|format=json"

The maxMappings setting determines how many mappings you want the macro to return. When maxMappings=0, this macro returns all the mappings for each specified DPID. Data is sorted by timestamp (most recent first) and returns results with the largest timestamp first.

endif
Required when using the conditional if and the SEGMENT_LIST and REMOVED_SEGMENT_LIST macros.
if(SEGMENT_LIST && REMOVED_SEGMENT_LIST)endif
This combination of macros creates a conditional statement that lists the segments users belong to and have been removed from. It returns an empty string if both conditions are not met or there's no data.
MCID
Adobe Experience Cloud ID.
OPEN_CURLY_BRACKET
Inserts an open curly bracket { character.
OPT_OUT
Deprecated. Do not use.
OUTPUT_ATTRIBUTE_TYPE
Deprecated. Do not use.
OUTPUT_ATTRIBUTE_VALUE
Returns 1 as a static, hardcoded value.
PID
Partner ID (PID). The PID appears under the Profile tab in the admin UI.
REMOVED_SEGMENT_LIST
Returns a list of segments, if any, that have been removed.
SEGMENT_LIST

Returns a list of segments in a list. Accepts the following optional variables:

  • segmentId: Legacy ID. Deprecated. Use sid (lower case only).
  • csegid: Legacy ID. Deprecated. Use sid (lower case only).
  • sid: Segment ID.
  • type: Returns 5, a static, hardcoded value that identifies data as segment data.
  • alias: Mapping of the segment. Deprecated. Use sid (lower case only).
  • lastUpdateTime: A Unix time stamp that indicates the last time a segment was realized.

Put these variables in curly brackets after the macro. For example, this code separates results with a pipe "|" character: <SEGMENT_LIST:{seg|<seg.type>,<seg.sid>}; separator="|">

SET_ATTRIBUTES
Returns 1 as a static, hardcoded value.
TAB
Inserts a tab separator.
TRAIT_LIST

Returns a list of traits. Accepts the following optional arguments:

  • type: Trait types identified by a numeric ID. This variable returns:

    • 10 which identifies a DPM trait (offline, onboarded by an inbound job).
    • 3 which identifies a rules-based trait (realtime,; onboarded through the DCS ).
  • traitId: Trait ID.

  • lastRealized: Last time the trait was realized. Unix timestamp.

Put these variables in curly brackets after the macro. For example, this code separates the results with a pipe "|" character: TRAIT_LIST{type|traitId};separator="|"

UUID
Audience Manager user ID.
recommendation-more-help
3d9f8cff-f6d8-4dcd-966c-cf2ea03db934