EDI Params reference
The Params field on each EDI destination is an INI-style text block: one KEY=value per line. Lines starting with # or ; are comments. Keys are case-insensitive in the editor but stored uppercase.
The Tenant Admin editor validates keys against the list below. Unknown keys show an error with a fuzzy “did you mean?” hint.
For how to create destinations and when to use Params, see EDI destinations.
INI format
# Example: resize before FTP upload, dry-run for testing
PIC_RESIZE_X=1280
PIC_RESIZE_Y=960
PIC_COMPRESSION=85
DRY_RUN=1
| Rule | Detail |
|---|---|
| Syntax | KEY=value — an = is required |
| Flags | 0 or 1 only |
| Integers | Whole numbers; some keys have min/max (see table) |
| Strings | Non-empty value |
| Protocol scope | Some keys apply only to specific protocols (noted in table) |
Supported keys
| Key | Type | Range / values | Protocol scope | Purpose |
|---|---|---|---|---|
SEND_DELAY | int | 0–43200 | All | Delay send by N minutes after trigger |
SEND_PICTURES_CHUNK_SIZE | int | 0–10000 | All | Split picture uploads into chunks of at most N pictures |
PIC_RESIZE_X | int | 0–20000 | All | Resize width (pixels) before send; 0 = no resize |
PIC_RESIZE_Y | int | 0–20000 | All | Resize height (pixels) before send; 0 = no resize |
PIC_COMPRESSION | int | 0–95 | All | JPEG quality after resize |
DRY_RUN | flag | 0 / 1 | All | 1 = simulate send without delivering |
TEST_MODE | flag | 0 / 1 | All | 1 = test-mode behaviour (per handler) |
WEB_ONLY | flag | 0 / 1 | All | 1 = destination hidden from mobile /tags actions |
INPUT_ESTIMATE_ID | flag | 0 / 1 | All | 1 = Gallery send requires estimate ID; excluded from mobile actions |
INPUT_ESTIMATE_DATE | flag | 0 / 1 | All | 1 = Gallery send requires estimate date; excluded from mobile actions |
INPUT_MESSAGE_BODY | flag | 0 / 1 | MAIL only | 1 = Gallery send requires message body; excluded from mobile actions |
SEND_PICTURES_FILENAME_MASK_POSTREPAIR | string | filename mask | All | Filename mask for pictures with post-repair (POST_REPAIR=1). Same placeholders as the destination Filename mask. When omitted, post-repair pictures use the normal Filename mask. Does not choose which pictures to send — Gallery Send uses the Pictures to send control (All / Before / Post Repair) for that |
ESTIMATE_DATE_FORMAT | string | e.g. Ymd, yyyy-mm-dd | All | Format for {estimate_date} placeholder in subject/filename/body |
SFTP_HOSTKEY_STRICT | flag | 0 / 1 | SFTP family | 1 = enforce host-key verification |
SFTP_HOSTKEY | string | non-empty | SFTP family | Expected host key (format per handler) |
SFTP_HOSTKEY_SHA256 | string | non-empty | SFTP family | SHA-256 host-key fingerprint |
SFTP_HOSTKEY_MD5 | string | non-empty | SFTP family | MD5 host-key fingerprint |
LOCALOVERLAY | flag | 0 / 1 | LOCAL | Force local-delivery overlay when terminal DATA_OVERLAY is off. LOCAL protocol only — ignored on MAIL/EOS/FTP*/API even if present in PARAMS |
APPLY_OVERLAY | flag | 0 / 1 | All | Force container+timestamp data overlay on outbound JPEG bytes when terminal DATA_OVERLAY is off. Terminal-on wins (PARAM cannot disable terminal overlay). Does not burn into stored source BLOBs |
LOCAL_JSON | flag | 0 / 1 | LOCAL | Emit JSON sidecar for local delivery |
PICTURE_DATE_DAYS | int | 1–365 | EOS | Picture date window for EOS API |
MAERSK_MODE | string | non-empty | API (AEMS) | Maersk AEMS mode string |
ORDER_STATUS | int | 100–599 | API (AEMS) | Filter maintenance orders by status code |
AEMS_WAIT_FOR_ORDER | flag | 0 / 1 | API (AEMS) only | 1 = a mailbox rule / mailbox file send that finds no matching order waits up to 24 hours for one to appear instead of failing at once (see AEMS API). Default / omitted / 0 = fail immediately |
MAIL_INCLUDE_BODY | flag | 0 / 1 | Legacy — prefer dedicated email body fields in the editor | |
MAIL_BODY_TEXT | string | non-empty | Legacy default body text | |
SMTP_CONFIG_PICTURES | string | config key | Pin outbound mail to a single named tenant SMTP config (see SMTP) |
SMTP_CONFIG_PICTURES (MAIL destinations)
When set to a tenant SMTP config key (for example MAIL or OPERATIONS):
- Only that named SMTP row is used for this MAIL destination
- The tenant primary → fallback → platform chain is not used
- If the key cannot be resolved, the send fails with
no_smtp_config(no fallback)
When omitted, MAIL destinations use the normal outbound SMTP chain (tenant route, then platform defaults).
Filename, subject, and body placeholders
Use {name} tokens in Email subject, Filename mask, and Email body (MAIL). The backend substitutes these at send time.
Supported placeholders
| Placeholder | Meaning |
|---|---|
{terminal} | Terminal code |
{container} | Container code |
{case_date} | Case date |
{dtingresso} | Ingress date (alias) |
{date} | Date context |
{today} | Current date |
{current_date} | Current date |
{today:…} / {current_date:…} | Date with custom format suffix |
{counter} … {counter5} | Send counters |
{user_first_name} {user_last_name} {user_email} {user_username} | Sending user |
{sender} {receiver} {location} {dest_name} {protocol} {device_id} | Destination metadata |
{estimate_id} {estimate_date} | User-supplied estimate inputs |
{remark} {tags} {notes} {licence_plate} | Case / picture metadata |
Legacy aliases (avoid in new configs)
| Legacy | Use instead |
|---|---|
{est_num} | {estimate_id} |
{est#} | {estimate_id} |
{estimate} | {estimate_id} |
{est_date} | {estimate_date} |
When ESTIMATE_DATE_FORMAT is set in Params, {estimate_date} is rendered using that format (the editor shows a preview hint).
Spreadsheet custom fields ([CR-20260917])
Mail-rule parse_spreadsheet may declare edi_fields so spreadsheet columns become {snake_case} tokens at send time. The EDI editor treats unknown tokens matching ^[a-z][a-z_]{0,47}$ as info (dynamic), not a save-blocking error — the destination cannot verify that a mail rule declares the name.
| Surface | Custom {edi_fields} tokens |
|---|---|
| Filename masks (MAIL / FTP / FTPS / SFTP / LOCAL / EOS) | Yes |
| MAIL subject + plain body | Yes |
| MAIL To / CC / BCC | No |
| FTP / LOCAL directory / address path templates | No |
| AEMS / prebuilt HTML bodies | No |
Built-in values (estimate_id, estimate_date, …) always win over a colliding custom name. Blank spreadsheet cells omit the token (empty string via snake_case fallback — not PHP date mangling).
Worker rollout: upgrade Celery workers and drain in-flight tasks before enabling edi_fields or saving masks that use custom tokens (old workers raise TypeError on unknown kwargs). Rollback: remove custom placeholders → disable edi_fields → drain → revert code.
Require spreadsheet placeholders ([CR-20260923])
Mail-rule parse_spreadsheet may set require_spreadsheet_placeholders: true (default off — omitted or false keeps today's send-on-blank behaviour). When on, a row's destination is skipped — not sent with a blank token — if the destination's FILENAME_MASK, SEND_PICTURES_FILENAME_MASK_POSTREPAIR Param, or (for PROTOCOL=MAIL) EMAIL_SUBJECT / MAIL_BODY_TEXT (the latter only when MAIL_INCLUDE_BODY is on) references a placeholder that the spreadsheet row does not supply a value for — either because no edi_fields declaration maps it, or the mapped column was blank for that row. The skip is logged with reason missing_required_edi_placeholder and a missing_placeholders list (no_mapping vs empty_value) in the row's processing log details.
Worker rollout: upgrade Celery workers and drain in-flight tasks before enabling require_spreadsheet_placeholders — the gate is evaluated only in updated worker code; old workers keep sending on blank tokens regardless of the flag. Rollback: disable the flag on the rule → drain → revert code.
Mobile app interaction
Destinations with any of these Params set to 1 are not offered as mobile upload actions (WEB_ONLY, INPUT_ESTIMATE_ID, INPUT_ESTIMATE_DATE, INPUT_MESSAGE_BODY):
WEB_ONLY=1— web Gallery onlyINPUT_ESTIMATE_*/INPUT_MESSAGE_BODY— mobile cannot collect the required fields
See Tags and the mobile API contract (POST /api/v1/mobile/tags in docs/api/mobile-client-contract.md) for how /tags builds the actions[] list.
Related
- EDI destinations — protocols, walkthrough, document types
- SMTP — platform defaults, tenant configs, outbound route
- Send — Destinations — end-user send flow