Outbound Template Macros
Lists the macros you can use to create outbound templates. These include file name macros, header macros, and content macros.
File Name and File Header Macros
The table lists and describes the macros you can use in the file name and to define header fields. For code samples, see Outbound Macro Examples.
ASCII_SOH
DPID
MASTER_DPID
NEW_LINE
ORDER_ID
PID_ALIAS
An alias for an order / destination ID.
The alias is set in the admin UI.
SPLITNUM
Indicates the splitting of outbound files into multiple parts. Replace the SPLITNUM section in the file name with the part number preceded by zeros, ensuring a minimum of three characters for the SPLITNUM section.
The SPLITNUM macro does not need to be surrounded by <> characters.
Example: <SYNC_TYPE>_<ORDER_ID>_<DPID>_<SYNC_MODE>_<TIMESTAMP>SPLITNUM.csv
s3_123456_9999_full_1566906141001.csv
s3_123456_9999_full_1566906141002.csv
s3_123456_9999_full_1566906141003.csv
The last three digits (001,002,003) in the examples above are the SPLITNUM identifiers.
SYNC_MODE
Indicates synchronization type and includes:
full
: Full synchronization.iter
: Incremental synchronization.
SYNC_TYPE
Indicates data transfer method and includes:
ftp
http
s3
TAB
TIMESTAMP
A 10-digit, UTC, Unix timestamp.
It can also be formatted as <TIMESTAMP; format="YYYYMMDDhhmmss">
following Java date/timestamp formatting rules.
Content Macros
Macros used to format the contents of a data file. For code samples, see Outbound Macro Examples.
CLOSE_CURLY_BRACKET
}
character.DP_UUID
Data Provider Unique User Identifier .
This is the ID for the data partner you send data to in an outbound file.
DP_UUID_LIST
DPID
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.
if(SEGMENT_LIST && REMOVED_SEGMENT_LIST)endif
MCID
OPEN_CURLY_BRACKET
{
character.OPT_OUT
ORDER_ID
OUTPUT_ATTRIBUTE_TYPE
OUTPUT_ATTRIBUTE_VALUE
1
as a static, hardcoded value.PID
PIDALIAS
An alias for an order / destination ID.
The alias is set in the admin UI.
REMOVED_SEGMENT_LIST
SEGMENT_LIST
Returns a list of segments in a list. Accepts the following optional arguments:
segmentId
: Segment ID. Deprecated. Usesid
.csegid
: Customer segment ID. Deprecated. Usesid
.sid
: Segment IDtype
: Returns5
, a static, hardcoded value that identifies data as segment data.alias
: Deprecated. Do not use.lastUpdateTime
: A Unix time stamp that indicates the last time segment membership status was updated.lastRealizationTime
: 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
1
, as a static, hardcoded value.SYNC_MODE
Indicates synchronization type and includes:
full
: Full synchronization.iter
: Incremental synchronization.
SYNC_TYPE
Indicates data transfer method and includes:
ftp
http
s3
TAB
TRAIT_LIST
Returns a list of traits. Accepts the following optional arguments:
-
type
: Identifies trait types by numeric ID. 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
: The last time the trait was realized. Unix time stamp.
Put these variables in curly brackets after the macro. For example, this code separates the results with a pipe "|" character: <TRAIT_LIST:{trait|<trait.Id>,<trait.lastRealized>};separator=","
UUID