#603 — Processing Statement analyzer trigger

Repo: Twill-AI/facade State: closed | Status: done Assignee: nadddder, Ahmad1809

Created: 2025-09-19 · Updated: 2025-10-15

Description

When a document is uploaded classified as statement, the statement analyzer should be triggered and result of it saved as an activity. Image

AC:

  • Edit the post API (/{merchant_id}/documents) to add an activity whenever a document with document type = PS is analyzed.
  • Add the data (as in the picture) needed for the toggle bar to the json output of the analyzer: min rate = max(1.9 , commission_zero_rate)
  • Cases with low volume considered and proper error handling added for them
  • add the functionality to save document category in the metadata column when document category!= PS
  • edit the schema for PS to capture POS fee and Platform fee to be used for a more efficient effective rate
  • add the weighted average of all PS documents to the activity table

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets