#542 — Facade have MCA backfill + nightly job
Repo: Twill-AI/facade State: closed | Status: done Assignee: meliascosta, Ahmad1809
Created: 2025-08-29 · Updated: 2025-10-27
Description
Request
Merged https://github.com/Twill-AI/twill-partner-portal/issues/17 to this task:
As a part of this task, a workflow within our platform will be created to connect to an Azure container, access the /reports folder and get the report/reports there, analyze them and return the requested fields, the requested fields are as follows:
- id
- merchant_id
- merchant_split_amount
- partner_split_amount
- fees
- created_at
- ingested_at
- file_url (Azure container)
The output will be a json with the required fields extracted from the report to be sent to an MCA table within facade.
Acceptance criteria
- Ability to access the link on a daily basis using SFTP to check for new EMS reports
- Ability to check if the report is a duplicate and is handled before and avoid that
- Ability to handle the successfully processed file and move them to a new folder “handled_by_facade”
- Ability to run on a new specified folder in case we needed to check the historical events or find a bug or mistake
- Ability to analyze the report/reports in an Azure container and extract the required fields to update the MCA table
- Create the MCA table to host the data with the required fields
- Migration done for the MCA table
- Facade has POST
/master/mcaAPI for back-filling MCA reports from files (with settings needed for behaviour explained above). Note that daily jobs are out of scope because would be added when we know files format,
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets