Data Feed Tokens
Use data feed tokens to:
- Specify a value that is not known until the data feed runs (such as the File Information tokens).
- Modify parameters in certain feeds (such as the HTTP Transporter tokens).
- Configure the behavior of a data feed (such as the General tokens).
On this page
File Information Tokens
All tokens are case-sensitive and must be entered as indicated so that the data feed recognizes the token. Tokens are identified by including curly braces around the token, for example, {TokenName}.
Example: File Information token
{DataFileDirectoryName}\success\{DataFileName}_{Now(yyyyMMddhhmmss)}.{DataFileExtension}
In this example, the File Information token:
- Renames a file by including the current date and time of the file.
- Moves the file to a subfolder of the folder where the file is currently located (the subfolder name is “success”).
Note: When you copy or import a data feed into another Archer instance, that data feed does not include the following 3 tokens:
-
LastRunTime
-
LastFileProcessed
-
PreviousRunContext
System tokens
Token |
Value |
Description |
|||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataFileDirectoryName |
Text |
Returns the name of the directory.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
DataFileName |
Text |
Returns the name of the data file without the extension. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
DataFileExtension |
Text |
Returns the extension of the data file. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
DataFileFullName |
Text |
Returns the information from the previous 3 tokens combined. This token is the simplified version of {DataFileDirectoryName}\{DataFileName}.{DataFileExtension} |
|||||||||||||||||||||||||||||||||||||||||||||||||||
Now |
Current Date/Time |
Returns the current system time. Formatting can be applied if desired. The default formatting is MM.dd.yyyy. Example: Time token On August 25, 2015 at 8:15:45PM, the token {Now}(yyyyMMdd_hhmmss) returns the value 20150825_081445. Common formatting options
|
General tokens
General tokens modify the default behavior of data feeds.
Token |
Value |
Description |
---|---|---|
VerboseLogging |
Boolean |
When this token is set to true, Verbose Logging is turned on during the current execution of the data feed. This setting temporarily turns on Verbose Logging for the entire system, not only for the data feed process. |
CrossReferencesMode |
LinkOnly |
When this token is set, the data feed process does not update content in any cross-reference fields. The data feed updates the link between the 2 applications. Using this token can improve the performance of the data feed. |
RelatedReferencesMode |
LinkOnly |
When this token is set, the data feed process does not update content in any related-record fields. The data feed updates the link between the 2 applications. Using this token can improve the performance of the data feed. |
MergeFiles |
Boolean |
When this token is set to true, the data feed merges XML files together before running the transform. This token runs the transformation against the entire source data set. Example: The transform is written to remove duplicates. By merging all XML files before running the transform, the data feed removes all duplicates from the entire data set. |
ExecuteCalcs |
Boolean |
By default, the data feed recalculates calculated fields affected by the modified content. Set this token to false to not automatically refresh the calculated field values. |
LastFileProcessed |
Text |
Name of the last source file that the data feed job processed in its last run. This value is read-only and the data feed overwrites the value at the end of every data feed run. |
LastRunTime |
Date/Time |
Date and time of the last completed run. 1 use for this token is to process deltas of the source content. For example, when running a Database Query Transporter, this token can be included in the WHERE clause of the query string to only include records from the source database that were inserted or updated since the last time the data feed ran. |
PreviousRunContext |
Text |
Note: This token is only used with the JavaScript Transporter. If you set this token for any other transporter type, it is an unused token. Use the PreviousRunContext token to provide contextual information about a previously run data feed. If you assign a value to this property, it will be available as an input the next time the feed runs. If you do not provide a value, the system clears the existing saved value. To set this token within your JavaScript file, add a previousRunContext parameter to the callback. For example: callback(null, { output: myData, previousRunContext: "My context here" }); Note: Run the data feed often, using this token to store where you left off, and then limit the amount of data in any 1 feed. Important: The PreviousRunContext token has a maximum length of 256 characters. |
BatchContentSave |
Integer |
Use the BatchContentSave token to upload large amounts of content records in batches through a data feed. It is recommended that you set this token value to 1,000 for the batch size. With the BatchContentSave token enabled, Archer prevents the BCS data feed mechanism from creating duplicate content when duplicate key data exists within a batch, and allows data feeds to effectively use the batch content save functionality while still honoring the key established in the data feed. Under the following conditions, the BatchContentSave token is not applicable, and the data feed reverts to normal operations:
Note: If the data feed reverts to normal operations, a warning message displays in the Messages section of the Run Detail page. The following conditions allow the BatchContentSave token, but content changes made with this token behave slightly differently than a regular feed:
|
EnableBatchContentSaveHistoryLog |
Boolean |
Use the EnableBatchContentSaveHistoryLog token to activate the history log when the BatchContentSave token is in use. Note:When the batch content save history log token is activated, the cross reference and related record fields are not updated in the History Log. |
Connection and transmission timeout tokens
Important: Environments that use proxy servers do not respect data feed connection and transmission timeout tokens. These tokens do not function with SaaS. The operating system of the proxy server controls the proxy timeout.
Token |
Value |
Description |
---|---|---|
ConnectionTimeout |
Integer |
The number of seconds the transporter will wait for the other site to respond to the request. |
TransmissionTimeout |
Integer |
The number of seconds the transporter will wait for all the information to be transmitted. The default read/write timeout is 5 minutes. |
These tokens change the timeout limits for the following transporters:
- Archer Web Service Transporter
- HTTP Transporter
- FTP Transporter
- RSS Transporter
Note: The Database Query Transporter only supports the TransmissionTimeout. Specify the connection timeout in the connection string.
Connection string tokens
The configuration file stores the connection string information in plain text. If you do not want the password to be stored in plain text, use the {password} token to encrypt the password. You can also encrypt the username by using the {username} token. Although, it is not as critical as encrypting the password because the username is not hidden when it is entered and the database stores it as plain text.
Token |
Description |
---|---|
username |
User name used to access the source database |
password |
Password used to access the source database |
Example:
Data tokens
Data tokens capture data from the last run of a data feed. To specify that a field value is saved, select the Token column of that field in the Source Data tab.
When the Token checkbox is selected for First Name, First Name appears in the list of tokens. After each run, the value from the last record is set in the Value field.
You can use this token in several settings throughout the data feed configuration.
Fields for the available tokens
Field |
Input |
---|---|
Post processing |
Destination files |
Archer Web Services transporter |
Configuration string |
Database Query transporter |
Query |
File transporter |
Path |
FTP transporter |
Fully qualified URI |
HTTP transporter |
Data request URI |
HTTP transporter |
Data request header parameters |
HTTP transporter |
Logon header parameters |
HTTP transporter |
Logoff header parameters |
Mail Monitor transporter |
Filter |
RSS transporter |
URL |
Example 1
This example describes how to configure a data feed to process only users who have been added since the last time the data feed ran using the Database Query Transporter.
The query looks like this:
SELECT UserId, UserName FROM UserTable WHERE UserId > {UserId} ORDER BY UserId
After the source fields are loaded, the Token checkbox is selected for the UserId field. After each data feed run, the token stores the last UserId from the source. The next run of the data feed includes only the UserIds that are after the stored token value. Notice that the query also orders by UserId to ensure the last sequenced UserId value is the value that the token stores.
Example 2
This example shows how to configure a data feed to process source records that were modified since the last time the data feed ran using the Database Query Transporter.
The query looks like this:
SELECT Value1, Value2, etc FROM someTable WHERE LastUpdatedDate > {LastRunTime}
The {LastRunTime} token is a built-in token that exists in every data feed so there is no need to define a custom data token.
Formula tokens
You can use formulas as tokens by placing an equals sign (=) in front of the first formula, after the token symbol. The token starts with {=.
Nested token symbols are invalid. If you want to include tokens in a formula, use the GETTOKEN function.
Example
This example shows how to configure a data feed to process source records that were modified within the same year in which the last the data feed ran using the Database Query Transporter.
The query looks like this:
SELECT Value1, Value2, etc FROM someTable WHERE LastUpdatedYear = {=YEAR(DATEVALUE(GETTOKEN(LastRunTime)))}
The YEAR function requires a serial date, which is achieved by calling the DATEVALUE function. The DATEVALUE function requires a string date and returns a serial date. Notice also that you cannot nest the token symbol. To obtain the value of the LastRunTime token, use the GETTOKEN function.
Supported functions
- AND
- CHAR
- CONCATENATE
- DATE
- DATEVALUE
- DAT
- DAYS360
- DOLLAR
- EXACT
- FALSE
- HOUR
- IF
- INDEX
- ISBLANK
- ISNONTEXT
- ISNUMBER
- ISTEXT
- LEFT
- LEN
- LOWER
- MATCH
- MID
- MINUTE
- MONTH
- NOT
- OFFSET
- OR
- POWER
- RIGHT
- SECOND
- SQRT
- SUBSTITUTE
- TEXT
- TIME
- TIMEVALUE
- TODAY
- TRIM
- TRUE
- UPPER
- VALUE
- WEEKWAY
- YEAR