Offer the AmlCheck action on completed call outcomes - #1225
Conversation
|
@Yannick1712 Could you review this one? Since the Google Sheets were shut down, the compliance tool is the only release path for the phone call queues, and completing a call currently leaves the transaction on Pending (details in the description). Two API-side questions in this context: is ManualCheckIpCountryPhone intentionally part of BlockAmlReasons (no cron recheck, manual pass as the official path), and is AUTO_AML_CHECK currently running normally in prod? |
|
@davidleomay Could you review this as well? Context is in the description and the comment above. |
|
@Yannick1712 Danke, ist umgesetzt: Default bei Completed ist jetzt Reset über den DELETE-Endpoint ( Zu deiner Frage: ja, Eine Sache habe ich dabei noch angepasst: Das userData-Update läuft jetzt vor dem Reset. Sonst gäbe es ein Fenster, in dem der Cron die zurückgesetzte Tx neu prüft, bevor das Check-Datum sichtbar ist, dann würde sie sofort wieder auf Pending/ManualCheckIpCountryPhone laufen und wäre wegen BlockAmlReasons wieder blockiert. Die Reihenfolge ist jetzt per Hook-Test abgesichert. |
|
@Yannick1712 Eine Frage aus dem ersten Kommentar ist noch offen und für den Reset-Default kritisch: Läuft Der Reset-Default hängt vollständig daran: Kannst du kurz bestätigen, dass der Prozess in prod aktiv ist? Dann wäre der PR aus meiner Sicht bereit. Die andere Frage (ist |
Problem
Saving a call-queue outcome with Completed stores the comment and the userData phone-call fields, but the pending transaction is never touched. The AmlCheck action selector is hidden exactly when the outcome is Completed:
so
saveCallOutcomeskips the transaction step entirely and the payment stays onamlCheck = Pending.For
ManualCheckIpCountryPhonethis is a dead end: the reason is part ofBlockAmlReasonsin the API, so the AML recheck cron never picks the pending transaction up again. Setting the userData check date alone has no effect there. This used to work in the Google-Sheet process; since the sheet access was removed, the tool is the only path.Fix
amlCheck+amlReasonviaDELETE :id/amlCheck, so the AML cron re-runs the full AML check: with the check date now set the phone error is gone, and the tx only passes if no other errors remain. Overridable via the selector.saveCallOutcometo write the userData update before the transaction step. A reset transaction is re-evaluated from scratch by the cron; if the check date were written after the reset, the cron could re-pend the tx into its recheck-blocked reason in the gap and it would be stuck again.Tests
call-queue-outcome-form.test.tsx: action offered for tx items, Reset default on Completed, override, reset on other outcomes, no action for user-based queue items.compliance-call-outcome.hook.test.ts: userData (incl. queue-specific check date, e.g.phoneCallIpCountryCheckDate) is written before the transaction reset; no transaction call without an action.npm test: 62 suites / 610 tests green,npm run lintclean on the touched files.