Send and receive files over SFTP
Sending data files
A data file carries one dataset: the contract's fields, checked as TrueAge reads them. Each file becomes one or more imports. Your TrueAge contact can tell you which records applied.
- Put the plan (or
all) and the as-of date in the file name. - Folders, order and every column are in File layouts, with a template to download for each file.
- Every column of every dataset is in the data dictionary.
- A file also answers a TrueAge request for fresh data for a plan or participant.
Technical notes · Sending data files
- Name:
<dataset>_<rk_plan_id|all>_<YYYYMMDD>.csv.rk_plan_idis your own id for the plan (see the glossary). The dataset is one of the twelve names below.allmeans the file may hold several plans; a plan id means every record must carry exactly thatrk_plan_id(otherwise the file is rejected,PLAN_MISMATCH). The date, a real calendar date, becomes theas_of_date. - UTF-8, with or without a byte-order mark. CRLF or LF line endings. Blank lines are skipped. A field containing a comma is in double quotes, and a quoted field stays on one line.
- The first row holds the contract field names. A header the dataset doesn't have is ignored and reported once as
UNKNOWN_FIELD_IGNORED. If you asked your TrueAge contact to set up a header mapping, your own header names are renamed to the contract's first. - An empty cell means the field is absent. Booleans are
trueorfalse. Decimals are plain numbers; dates areYYYY-MM-DD. - A repeated header, a row with a different number of columns than the header, a header with no rows, or a bad name rejects the whole file before any record is read.
- TrueAge collects files from your SFTP host at times you agree with your TrueAge contact. Your contact can also import a file for you (
.csvonly, up to 50 MB). What happens to a file afterwards is under What happens to your files.
The twelve data files
Each file name starts with its dataset name. Every file must carry the required columns, whichever you send the rest of. Every column, with its format, is in File layouts.
| File | Required columns | Others |
|---|---|---|
plan | rk_plan_id, plan_name, plan_type, plan_status, plan_year_end, employer_name | 6 |
plan_provision | rk_plan_id | 4 |
employer_match_tier | rk_plan_id, employee_contribution_min, employer_match_rate | 1 |
plan_source_type | rk_plan_id, source_type_id, source_type_description | 1 |
plan_fund | rk_plan_id, fund_id, fund_name | 5 |
participant_identity | rk_participant_id, first_name, last_name, date_of_birth | 1 |
participant_contact | rk_participant_id | 9 |
employment | rk_participant_id, rk_plan_id, employment_status | 6 |
beneficiary | rk_participant_id | 7 |
fund_balance | rk_participant_id, rk_plan_id, fund_id, source_type_id, current_balance, vested_balance, shares_held, balance_as_of_date | 1 |
balance_total | rk_participant_id, rk_plan_id, total_balance, total_vested_balance, outstanding_loan_balance, balance_as_of_date | 0 |
contribution | rk_participant_id, rk_plan_id | 12 |
Large files and sending twice
TrueAge cuts anything past 10,000 records into several imports without splitting one participant's records, or one plan's funds, source types and match tiers, across them. If a transfer fails, send the file again. The same file never applies twice.
What happens to your files
Each file you send ends in one of two ways.
- Received: TrueAge moves the file to your archive folder when one is set up. Without one, the file stays and is read again at the next collection, which changes nothing because the content decides duplicates.
- Rejected as a whole: the file stays in place and isn't archived, and it creates no import. TrueAge sends no notice, so a missing import is the sign. Fix the file and send it again, or tell your TrueAge contact.
- An identical file sent again is a duplicate, even if its first import failed. To retry, change the content or ask your TrueAge contact.
Receiving allocation changes as a file
If you take allocation changes by file, TrueAge writes the allocation changes that are waiting into one file each business day. Each row is one leg of an allocation change for you to carry out.
- A file is never sent twice by itself, because running a transfer twice could move money twice.
- One not carried out? Tell your TrueAge contact. TrueAge resends it.
Technical notes · Receiving allocation changes as a file
- Columns:
allocation_change_id,rk_participant_id,rk_plan_id,change_type,effective_date,leg,fund_id,source_type_id,percent,amount,delivery_attempt,first_delivered_at,supersedes_allocation_change_id. - One row per leg.
legisallocation(reallocationandinvestment_election:fund_idandpercent),sellandbuy(fund_transfer) orqdia(optout_reversal:fund_id). A sell has exactly one ofamountin dollars andpercentof that fund's balance when it runs; 1.0000 sells it all. A column a leg doesn't use is empty. percentis a proportion at four decimals (0.6000 is 60%);amounthas two decimals. Rows run byeffective_date, thenallocation_change_id, sells before buys.delivery_attemptandfirst_delivered_atrepeat on every leg of an allocation change.- LF line endings and a header row. A second file on the same day is
allocation_changes_<YYYYMMDD>_1.csv, then_2. TrueAge never overwrites a file. - Placed on your SFTP host when an outbound path is set for you. Up to 10,000 allocation changes go in one file; the rest wait for the next run.
- The export runs at 12:00 UTC, Monday to Friday (8:00 AM EDT in summer, 7:00 AM EST in winter). US holidays are not skipped. It runs for integrations set up to receive allocation changes by file.
Receiving a daily status file
If you ask your TrueAge contact for it, TrueAge writes each participant's enrollment and latest result to one file each business day. It carries what the readiness result does, so you can feed the card from it.
Technical notes · Receiving a daily status file
- Columns:
rk_participant_id,rk_plan_id,trueage_enrolled,trueage_enrolled_date,managed_account_enrolled,managed_account_enrolled_date,managed_account_status,managed_account_opted_out_date,readiness_status,calculated_at,true_age,goal_retirement_age,retirement_status,retirement_index,income_low,income_median,income_high,is_retired,missing_inputs. Each is described in the data dictionary. - A full snapshot: every participant in your plans, one row per plan. A participant with no plan you have named to TrueAge has one row with an empty
rk_plan_id. - An empty cell means the value doesn't apply.
missing_inputsis separated by semicolons. LF line endings and a header row. - A second run on the same day replaces that day's file.
- Written with the allocation changes file, at 12:00 UTC, Monday to Friday. Placed on your SFTP host when an outbound path is set for you.
Confirming by file
- Name
allocation_change_confirmations_<YYYYMMDD>.csv- One row
- One answer for one allocation change.
- Where
- Collected from your SFTP host, or imported for you by your TrueAge contact.
Answer the daily file with a confirmations file. Each row says what you did with one allocation change, and sending the same answer twice is safe.
Technical notes · Confirming by file
- Columns:
allocation_change_id,status,rk_reference,reason_code,reason,executed_at,trade_date.allocation_change_idandstatusare required; the others are optional. statusisaccepted,rejectedorexecuted, and moves one way. A first row may beaccepted,executedorrejected. Afteraccepted, a row may beexecutedorrejected.executedandrejectedare final. Arejectedrow must carryreason_code.executed_atandtrade_datego only withexecuted. Per-fund executions are not carried in this file.- An unknown header, a repeated header, a missing required header, or a row with the wrong number of columns rejects the file. A row with a bad value is reported on its own and the rest apply.
- Repeating a status already applied, with the same or no
rk_reference, is a no-op.
Next: File layouts