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).

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

The following table describes the system tokens.

Token

Value

Description

DataFileDirectoryName

Text

Returns the name of the directory.

  • When used for the PostProcessing - Local Copy section, the directory name refers to the working directory for the temporary file that the Data Feed service creates.
  • When used in all other places, the token refers to the source directory name.

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

The following table describes common formatting options.

Format Specifier

Description

Examples

d

The day of the month, from 1 through 31.

6/1/2009 1:45:30 PM -> 1

6/15/2009 1:45:30 PM -> 15

dd

The day of the month, from 01 through 31.

6/1/2009 1:45:30 PM -> 01

6/15/2009 1:45:30 PM -> 15

h

The hour, using a 12-hour clock from 1 to 12.

6/15/2009 1:45:30 AM -> 1

6/15/2009 1:45:30 PM -> 1

hh

The hour, using a 12-hour clock from 1 to 12.

6/15/2009 1:45:30 AM -> 01

6/15/2009 1:45:30 PM -> 010

H

The hour, using a 24-hour clock from 0 to 23.

6/15/2009 1:45:30 AM -> 1

6/15/2009 1:45:30 PM -> 13

HH

The hour, using a 24-hour clock from 00 to 23.

6/15/2009 1:45:30 AM -> 01

6/15/2009 1:45:30 PM -> 13

m

The minute, from 0 through 59.

6/15/2009 1:09:30 AM -> 9

6/15/2009 1:09:30 PM -> 9

mm

The minute, from 00 through 59.

6/15/2009 1:09:30 AM -> 09

6/15/2009 1:09:30 PM -> 09

M

The month, from 1 through 12.

6/15/2009 1:45:30 PM -> 6

MM

The month, from 01 through 12.

6/15/2009 1:45:30 PM -> 06

s

The second, from 0 through 59.

6/15/2009 1:45:09 PM -> 9

ss

The second, from 00 through 59.

6/15/2009 1:45:09 PM -> 09

t

The first character of the AM/PM designator.

6/15/2009 1:45:30 PM -> P

tt

The AM/PM designator.

6/15/2009 1:45:30 PM -> PM

yy

The year, from 00 to 99.

1/1/0001 12:00:00 AM -> 01

1/1/0900 12:00:00 AM -> 00

1/1/1900 12:00:00 AM -> 00

6/15/2009 1:45:30 PM -> 09

yyyy

The year as a 4-digit number.

1/1/0001 12:00:00 AM -> 0001

1/1/0900 12:00:00 AM -> 0900

1/1/1900 12:00:00 AM -> 1900

6/15/2009 1:45:30 PM -> 2009

General tokens

General tokens modify the default behavior of data feeds.

The following table describes the general tokens.

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:

  • Target is a questionnaire.
  • Target uses workflow or advanced workflow.
  • Target field mappings include CAST field details.
  • Target field mappings include data points within a questionnaire. Linking functions as expected.
  • Token value contains a non-numeric value.
  • Token value exceeds 5,000.

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:

  • Campaigns within questionnaires that target the application do not recognize changes to trigger on assessment.
  • Target applications that include a field using trending do not see the changes on the trending display.
  • Content changes made by data feeds with the BatchContentSave token are not captured within any Archer History Logs. However, the updates are noted within the Field Audit History information.

  • Reminder Notifications still run normally, but notifications run with content save are not triggered.

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.

The following table describes the connection and transmission timeout tokens.

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.

The following table describes the connection string tokens.

Token

Description

username

User name used to access the source database

password

Password used to access the source database

Example:

Data feeds connection string token 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.

Data feeds token example

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.

Data feeds new token selected example

You can use this token in several settings throughout the data feed configuration.

Fields for the available tokens

The following table lists the 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