FTP

Functions and settings available for the FTP endpoint

Functions

The following list of functions are available in the FTP system:

getFiles

postFiles

Functions lists are expanding weekly, this list was accurate at the date of publishing.

Settings

The following settings below are optional for FTP type integrations.

array_key

tbc.

array_merging

Used when combining multiple events together in the destination functions. This settings allows the specification of a top level key that will be merged together.

  • Type: Text

  • Required: No

  • Default: N/A

Applicable functions:

  • PostFiles

Example:

array_merging = "products"

edi_format

edi_line_identifier

edi_group_terminator

edi_force_multiples

edi_multi_line

event_grouping

tbc

file_far

Ability to find and replace in a file after its generation. This feature can be helpful if the use of protected key names is required.

  • Type: Text

  • Required: No

  • Default: N/A

Applicable functions:

  • PostFiles

Example:

file_far = "find_first|replace_first,find_second|replace_second"

filename_format

Defines the output file naming convention

  • Type: Text

  • Required: No

  • Default: ##DATETIME##.##EXTENSION##

Applicable functions:

  • PostFiles

Example:

filename_format = "Payout_Report_##DATETIME##.xml"

Dynamic field values:

Setting

Output

Example

##JOBID##

Injects the current job id used in the data stream by HighCohesion.

1b503450-89ea-11ea-903e-6ef3fac04b7e

##DATETIME##

Injects the current date and time in the format: YYYY-MM-DD-HH-mm-SS

2020-06-01-11-00-00

##DATETIMEEXACT##

Injects the current date and time with milliseconds in the format: YYYY-MM-DD-HH-mm-SS-zzz

2020-06-01-11-00-00-000

##DATETIMEFORMAT__XXX__##

Inject a custom date time format. Where __XXX__ is replaced with the required formatting. Example being: ##DATETIMEFORMAT__Ymd__##

20200601

##TIMESTAMP##

Injects the current Unix timestamp.

1588149986

##EXTENSION##

xml

##INCREMENT##

Injects an incremented number based on the stream ID. Checks the HighCohesion internal increment pointer for the stream in use. Each time that the stream is triggered the pointer will increment by one.

42

##PK__XXX__##

Injects the value of a specified payload key where XXX is replaced with a payload key. For example ##PK__order_number__##

GB101231

formatting

Defines the input or output file formatting.

  • Type: List

  • Required: No

  • Default: xml

Applicable functions:

  • GetFiles

  • PostFiles

Example:

formatting = "csv"

List values:

Setting

Output

xml

XML file formatter

json

JSON file formatter

csv

CSV file formatter

xls

XLS file formatter

group_on

Allows the grouping of lines from an input file based on a specific column.

  • Type: Text

  • Required: No

  • Default: N/A

  • Relative to: CSV and XLS file imports.

Applicable functions:

  • GetFiles

Example: The example below would group lines of a CSV file together based on the order_number column. The is helpful when receiving CSV files from systems such as warehouse management systems that can send multiple lines in one file.

group_on = "order_number"

increment_in_file

Ability to inject the data stream increment reference into the payload_out data, before file generation. For example if the destination needs unique file number reference in the file. The value should be the path to add the increment to in the output data.

  • Type: Text

  • Required: No

  • Default: false

Applicable functions:

  • PostFiles

Example:

increment_in_file = "header.reference.number"

index_array

Allows the breaking up in to individual events based on a key that should be present in the input file data.

  • Type: Text

  • Required: No

  • Default: N/A

  • Relative to: XML file imports.

Applicable functions:

  • GetFiles

Example: ...

index_array = "Products"

line_index_array

remote_path

Allows definition of the remote path. Use this setting to instruct the data stream where to look for files on the remote location.

  • Type: Text

  • Required: No

  • Default: /

Applicable functions:

  • GetFiles

  • PostFiles

Example:

remote_path = "/orders/uk_website/"

root_element

Allows the specification of the root XML element.

  • Type: Text

  • Required: No

  • Default: data

  • Relative to: XML file exports.

Applicable functions:

  • PostFiles

Example:

root_element = "Orders"

skip_incrementer

tbc.

skip_path_check

Defines if the system should skip the remote path check. This is especially helpful for some sFTP destinations where the remote list functionality is not available.

  • Type: Boolean

  • Required: No

  • Default: false

Applicable functions:

  • PostFiles

Example:

skip_path_check = true

Last updated