> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tangoanalytics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gl outbound file

# Tango GL Outbound — File

> Generated from `Tango GL Outbound Integration Technical Specification V1.1.docx` in SharePoint folder `02 Lease Integrations`.
> **MD only — no OAS YAML** generated per request. (See [`gl-outbound-api.yaml`](./gl-outbound-api.yaml) for the API counterpart.)

## Overview

SFTP file-based outbound. Tango writes approved Journal Entries (batch accruals) as a pipe-delimited file to its SFTP server on a periodic (monthly) basis for booking Straight-Line Journal Entries and General Ledgers, lease-related assets, liabilities, and other expense accruals/amortizations.

The 3-step internal flow is identical to the API variant:

1. Generate accruals from all sources → Batch Journal Entries screen.
2. Approve the JEs.
3. Transmit to SFTP file (this integration).

**Owner:** Tango Analytics
**Spec version:** 1.1
**Status:** Draft (auto-generated — needs review)

## Transport

| Attribute | Value | |
| - | - | - |
| Direction | Outbound (Tango → Client) | |
| Mechanism | SFTP file drop | |
| File format | Pipe-delimited (\` | `) text, `.txt\` |
| File naming | `{ClientName}_glout_MMDDYYYYHHMMSS.txt` | |
| Production host | `sftp.tangoanalytics.com` | |
| Test host | `sftpdev.tangoanalytics.com` | |
| Path | `outbound/gl/` | |
| Auth | SFTP user/password (TBD) | |
| Frequency | Monthly (intended) | |

Prior files are moved to `Processed/<timestamp>` before each write; no file is written when there is no data.

## Integration logic

* Only accruals on `Active` leases are exported.
* Only `APPROVED` batches are picked up.
* All line items from approved batches → file.
* After processing, posting status on the accounting schedule transitions to `PROCESSED` (covers current and prior periods for error-correcting JEs).
* Notifications and emails are generated on validation failures.

## Data fields

| Field | Type | Required | Sample | Description |
| - | - | - | - | - |
| `BATCH_ID` | NUMBER | ✅ | `9999` | Defined by Tango |
| `GL_TYPE` | VARCHAR | ✅ | `Accrual` | Lookup `LEASE_ACCRUAL_TYPE` |
| `LOCATION_NUMBER` | VARCHAR | ✅ | `S123` | |
| `LEASE_NUMBER` | VARCHAR | ✅ | `5968` | Client-defined |
| `ASSET_TYPE` | VARCHAR | ✅ | `REAL ESTATE` | |
| `EXPENSE_TYPE` | VARCHAR | ✅ | `RENT` | |
| `LINE_DESCRIPTION` | VARCHAR | – | `842OP RE Min Rent Exp 0320` | |
| `ACCOUNT_DESC` | VARCHAR | ✅ | `PREPAID` | |
| `ACCOUNT_NUMBER` | VARCHAR | ✅ | `1234` | GL Account |
| `TRANSACTION_AMOUNT` | NUMBER | ✅ | `2400` | Positive = Dr, negative = Cr |
| `LEGAL ENTITY` ⚠ | NUMBER | ✅ | `8` | Source uses space; should likely be `LEGAL_ENTITY` |
| `BRAND` | VARCHAR | ✅ | | |
| `LEASE_FINANCIALS_GROUP` | VARCHAR | ✅ | | |
| `JE_NUMBER` | VARCHAR | ✅ | | |
| `ACCOUNTING_CLASSIFICATION` | VARCHAR | ✅ | `OPERATING/FINANCE` | |
| `DEPARTMENT` | VARCHAR | ✅ | | |
| `REGION` | VARCHAR | ✅ | | |
| `CURRENCY` | VARCHAR | – | `USD` | |
| `FISCAL_PERIOD` | NUMBER | ✅ | `1` | |
| `FISCAL_YEAR` | NUMBER | ✅ | `2018` | |
| `COMMENTS` | VARCHAR | ✅ | | |
| `POSTING_DATE` | DATE | – | `1/31/2018` | Last day of fiscal period (from fiscal calendar) |

## Validations

| Condition | Error message |
| - | - |
| Lease Number missing | `Fatal Error: Lease Number is not available` |
| Posting Date missing | `Fatal Error: Posting Date is not available` |
| GL Account (Account Number) missing | `Fatal Error: GL Account (Account Number) is not available` |

## Open Questions / Assumptions

* [ ] **`LEGAL ENTITY` field name** has a space in source — likely should be `LEGAL_ENTITY`. Confirm.
* [ ] **SFTP credentials** are `<TBD>`.
* [ ] **Timing/frequency** specifics are `<TBD>`.
* [ ] **`TRANSACTION_AMOUNT` sign convention**: positive = debit, negative = credit (per Test Scenario #7).
* [ ] **`PERIOD_END_DATE`** referenced in test scenarios but not in the data-mapping table — likely a synonym for `POSTING_DATE`.
* [ ] **30-character limit** on Tango batch description (Test Scenario #3) — applies in Tango UI, not enforceable at file load.
* [ ] **Pre-opening / opening JE logic** (Test Scenarios 8, 9) handled inside Tango's accrual generation, not in the file format.
* [ ] Reference documents (Journal Entry Descriptions, JE Model.xlsx, JE accrual design.xlsx, Plain Language JEs) sit alongside in SharePoint — not used for this generation.

## Changelog

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1–1.0 | 2020-2023 | (see source doc) | Various |
| 1.1 | 06/19/2025 | Integration logic — posting status | Dimple Israni |
