# calisatgi/um-process-gift architecture

> Architecture diagram of the GitHub repository calisatgi/um-process-gift, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/calisatgi/um-process-gift
- Repository: https://github.com/calisatgi/um-process-gift

## Overview

UM-Process-Gift appears to be a command-line report tool for finding recently bounced Campaign Monitor transactional messages and exporting their details. The visible workflow fetches clients, retrieves and filters bounced-message timelines, looks up message details, extracts gift/revenue identifiers, and prepares a sorted report. The source excerpt is incomplete: it does not show the full client-selection flow or the final export dispatch, so those connections are not asserted. The README provides no further capability detail.

Main entry points: [`CM_Bounced_CLI.py`](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py) (Workflow coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI workflow"]
  node_main["Workflow coordinator<br/>[CM_Bounced_CLI.py]"]
  node_client_selection["Client selection<br/>[CM_Bounced_CLI.py]"]
end

subgraph group_collection["Message collection"]
  node_client_fetch["Fetch clients<br/>[CM_Bounced_CLI.py]"]
  node_timeline_fetch["Fetch bounce timeline<br/>[CM_Bounced_CLI.py]"]
  node_date_filter["Seven-day filter<br/>[CM_Bounced_CLI.py]"]
  node_detail_fetch["Fetch message details<br/>[CM_Bounced_CLI.py]"]
end

subgraph group_reporting["Report preparation"]
  node_identifier_extract["Extract identifiers<br/>[CM_Bounced_CLI.py]"]
  node_report_data["Build sorted report<br/>[CM_Bounced_CLI.py]"]
  node_pdf_export["PDF export<br/>[CM_Bounced_CLI.py]"]
  node_excel_export["Excel export<br/>[CM_Bounced_CLI.py]"]
end

node_operator(("Operator"))
node_campaign_monitor["Campaign Monitor API"]
node_report_file["Report file"]

node_operator -->|"starts"| node_main
node_main -->|"requests clients"| node_client_fetch
node_client_fetch -->|"calls API"| node_campaign_monitor
node_main -->|"prompts selection"| node_client_selection
node_main -->|"requests timeline"| node_timeline_fetch
node_timeline_fetch -->|"calls API"| node_campaign_monitor
node_main -->|"filters messages"| node_date_filter
node_main -->|"requests details"| node_detail_fetch
node_detail_fetch -->|"calls API"| node_campaign_monitor
node_main -->|"parses details"| node_identifier_extract
node_main -->|"sorts records"| node_report_data
node_pdf_export -->|"writes PDF"| node_report_file
node_excel_export -->|"writes workbook"| node_report_file

click node_main "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_client_selection "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_client_fetch "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_timeline_fetch "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_date_filter "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_detail_fetch "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_identifier_extract "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_report_data "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_pdf_export "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"
click node_excel_export "https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_client_selection toneBlue
class node_client_fetch,node_timeline_fetch,node_date_filter,node_detail_fetch toneAmber
class node_identifier_extract,node_report_data,node_pdf_export,node_excel_export,node_campaign_monitor toneMint
class node_operator,node_report_file toneIndigo
```

## Components

### CLI workflow

- [Workflow coordinator](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [Client selection](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`

### Message collection

- [Fetch clients](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [Fetch bounce timeline](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [Seven-day filter](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [Fetch message details](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`

### Report preparation

- [Extract identifiers](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [Build sorted report](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [PDF export](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`
- [Excel export](https://github.com/calisatgi/um-process-gift/blob/main/CM_Bounced_CLI.py): `CM_Bounced_CLI.py`

### Other components

- **Operator**
- **Campaign Monitor API**
- **Report file**

## Connections

- Operator → Workflow coordinator: starts
- Workflow coordinator → Fetch clients: requests clients
- Fetch clients → Campaign Monitor API: calls API
- Workflow coordinator → Client selection: prompts selection
- Workflow coordinator → Fetch bounce timeline: requests timeline
- Fetch bounce timeline → Campaign Monitor API: calls API
- Workflow coordinator → Seven-day filter: filters messages
- Workflow coordinator → Fetch message details: requests details
- Fetch message details → Campaign Monitor API: calls API
- Workflow coordinator → Extract identifiers: parses details
- Workflow coordinator → Build sorted report: sorts records
- PDF export → Report file: writes PDF
- Excel export → Report file: writes workbook
