Outbound Template Macros 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 file-name-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_SOHDPIDMASTER_DPIDNEW_LINEORDER_IDPID_ALIASAn alias for an order / destination ID.
The alias is set in the admin UI.
SPLITNUMIndicates 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_MODEIndicates synchronization type and includes:
full: Full synchronization.iter: Incremental synchronization.
SYNC_TYPEIndicates data transfer method and includes:
ftphttps3
TABTIMESTAMPA 10-digit, UTC, Unix timestamp.
It can also be formatted as <TIMESTAMP; format="YYYYMMDDhhmmss"> following Java date/timestamp formatting rules.
Content Macros content-macros
Macros used to format the contents of a data file. For code samples, see Outbound Macro Examples.
CLOSE_CURLY_BRACKET} character.DP_UUIDData Provider Unique User Identifier .
This is the ID for the data partner you send data to in an outbound file.
DP_UUID_LISTDPIDDPUUIDSThe 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)endifMCIDOPEN_CURLY_BRACKET{ character.OPT_OUTORDER_IDOUTPUT_ATTRIBUTE_TYPEOUTPUT_ATTRIBUTE_VALUE1 as a static, hardcoded value.PIDPIDALIASAn alias for an order / destination ID.
The alias is set in the admin UI.
REMOVED_SEGMENT_LISTSEGMENT_LISTReturns 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_ATTRIBUTES1 , as a static, hardcoded value.SYNC_MODEIndicates synchronization type and includes:
full: Full synchronization.iter: Incremental synchronization.
SYNC_TYPEIndicates data transfer method and includes:
ftphttps3
TABTRAIT_LISTReturns a list of traits. Accepts the following optional arguments:
-
type: Identifies trait types by numeric ID. Returns:10which identifies a DPM trait (offline, onboarded by an inbound job).3which 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