# Conductor OSS — File Management Use Cases Five real-world scenarios where Conductor orchestrates file creation, processing, and delivery across workflow stages. --- ## 1. Returns & Refund Document Processing A customer initiates a product return. Conductor orchestrates the intake of return photos/documents, validates eligibility, generates an RMA (Return Merchandise Authorization) form, and produces the final refund receipt — all as a single traceable workflow. ### Workflow ```mermaid flowchart TD A["Customer Submits
Return Request"] --> B["HTTP Task:
Fetch Order Details"] B --> C["INLINE Task:
Validate Return Window"] C --> D{"SWITCH:
Eligible?"} D -- No --> E["Generate Denial
Letter PDF"] E --> E1["Email Denial
to Customer"] D -- Yes --> F["HUMAN Task:
Agent Reviews Photos"] F --> G{"SWITCH:
Condition Check"} G -- Damaged --> H["Generate RMA Form
+ Prepaid Shipping Label"] G -- Wrong Item --> H G -- Other --> I["HUMAN Task:
Escalate to Supervisor"] I --> H H --> J["FORK"] J --> K["Branch 1:
Process Refund via
Payment Gateway"] J --> L["Branch 2:
Generate Refund
Receipt PDF"] J --> M["Branch 3:
Update Inventory
System"] K --> N["JOIN"] L --> N M --> N N --> O["Email RMA + Receipt
+ Shipping Label
to Customer"] O --> P["Archive All Docs
to S3"] style A fill:#4CAF50,color:#fff style D fill:#FF9800,color:#fff style G fill:#FF9800,color:#fff style J fill:#2196F3,color:#fff style N fill:#2196F3,color:#fff style P fill:#9C27B0,color:#fff ``` ### Files Produced | Stage | File | Format | |-------|------|--------| | RMA Generation | `rma_RET-9001.pdf` | PDF | | Shipping Label | `label_RET-9001.png` | 4×6 ZPL/PNG | | Refund Receipt | `receipt_RET-9001.pdf` | PDF | | Denial Letter | `denial_RET-9001.pdf` | PDF (if ineligible) | ### Conductor Primitives SWITCH, HUMAN, FORK/JOIN, HTTP, INLINE, SUB_WORKFLOW --- ## 2. AI-Powered Knowledge Base Builder (RAG Pipeline) An organization ingests documents (PDFs, Word files, web pages) into an AI-ready knowledge base. Conductor orchestrates crawling, extraction, chunking, embedding generation, and vector store indexing — enabling retrieval-augmented generation (RAG) for chatbots and search. ### Workflow ```mermaid flowchart TD A["Trigger:
New Docs Uploaded
to S3 Bucket"] --> B["DO_WHILE:
Process Each Document"] B --> C{"SWITCH:
File Type?"} C -- PDF --> D["Extract Text
via Apache Tika"] C -- DOCX --> E["Extract Text
via python-docx"] C -- HTML --> F["Scrape & Clean
via BeautifulSoup"] C -- Other --> G["OCR via
Tesseract"] D --> H["INLINE Task:
Chunk Text
(512 tokens, 50 overlap)"] E --> H F --> H G --> H H --> I["DYNAMIC_FORK:
Generate Embeddings
(1 per chunk)"] I --> J["LLM_TEXT_COMPLETE:
Create Embedding Vector"] J --> K["JOIN:
Collect All Vectors"] K --> L["HTTP Task:
Upsert to Vector DB
(Pinecone / Weaviate)"] L --> M["Generate Metadata
Index JSON"] M --> N{"More Docs?"} N -- Yes --> B N -- No --> O["Write Master
Index Manifest"] O --> P["Upload Manifest
+ Logs to S3"] style A fill:#4CAF50,color:#fff style C fill:#FF9800,color:#fff style I fill:#2196F3,color:#fff style K fill:#2196F3,color:#fff style N fill:#FF9800,color:#fff style P fill:#9C27B0,color:#fff ``` ### Files Produced | Stage | File | Format | |-------|------|--------| | Extracted Text | `extracted_{doc_id}.txt` | Plain text | | Chunk Manifest | `chunks_{doc_id}.jsonl` | JSONL | | Embedding Vectors | `embeddings_{doc_id}.npy` | NumPy binary | | Metadata Index | `index_{doc_id}.json` | JSON | | Master Manifest | `kb_manifest_{run_id}.json` | JSON | | Pipeline Log | `pipeline_log_{run_id}.txt` | Text | ### Conductor Primitives DO_WHILE, SWITCH, DYNAMIC_FORK, LLM_TEXT_COMPLETE, HTTP, INLINE --- ## 3. Multi-Format Media Transcoding & Publishing A media company uploads a master video file. Conductor fans out transcoding jobs to produce multiple resolutions and formats, generates thumbnails, extracts subtitles via speech-to-text, and publishes everything to a CDN — all in parallel where possible. ### Workflow ```mermaid flowchart TD A["Master Video
Uploaded (4K ProRes)"] --> B["INLINE Task:
Validate & Extract
Media Metadata"] B --> C["FORK (3 Branches)"] C --> D["Branch 1:
DYNAMIC_FORK
Transcode Variants"] D --> D1["1080p H.264 MP4"] D --> D2["720p H.264 MP4"] D --> D3["480p H.264 MP4"] D --> D4["1080p WebM VP9"] D --> D5["HLS Adaptive
Playlist (.m3u8)"] C --> E["Branch 2:
Thumbnail Generation"] E --> E1["Extract Keyframes
(every 30s)"] E1 --> E2["Resize to
320×180 JPG"] E2 --> E3["Generate Poster
Image 1920×1080"] C --> F["Branch 3:
Speech-to-Text"] F --> F1["LLM_TEXT_COMPLETE:
Transcribe Audio"] F1 --> F2["Generate SRT
Subtitle File"] F2 --> F3["Generate VTT
Subtitle File"] D1 --> G["JOIN"] D2 --> G D3 --> G D4 --> G D5 --> G E3 --> G F3 --> G G --> H["Generate
Manifest JSON"] H --> I["HTTP Task:
Upload All Assets
to CDN"] I --> J["HTTP Task:
Update CMS
with URLs"] J --> K["Notify Editorial
Team via Slack"] style A fill:#4CAF50,color:#fff style C fill:#2196F3,color:#fff style D fill:#FF5722,color:#fff style G fill:#2196F3,color:#fff style K fill:#9C27B0,color:#fff ``` ### Files Produced | Stage | File | Format | |-------|------|--------| | Transcoded Videos | `video_{res}.mp4`, `video_1080p.webm` | MP4, WebM | | HLS Playlist | `stream.m3u8` + segment `.ts` files | HLS | | Thumbnails | `thumb_{timestamp}.jpg` | JPEG | | Poster Image | `poster.jpg` | JPEG 1920×1080 | | Subtitles | `subs_en.srt`, `subs_en.vtt` | SRT, VTT | | Manifest | `publish_manifest.json` | JSON | ### Conductor Primitives FORK/JOIN, DYNAMIC_FORK, LLM_TEXT_COMPLETE, HTTP, INLINE --- ## 4. Order Invoice, Packing Slip & Shipping Label Generation An e-commerce order triggers Conductor to fetch order data, then fan out in parallel to generate three documents — a customer-facing invoice, a warehouse packing slip (no pricing), and a carrier shipping label — before bundling and distributing them. ### Workflow ```mermaid flowchart TD A["Order Placed
(Webhook)"] --> B["HTTP Task:
Fetch Order +
Customer Profile"] B --> C["INLINE Task:
Calculate Totals
(tax, discounts, shipping)"] C --> D["FORK (3 Branches)"] D --> E["Branch 1:
Generate Invoice PDF"] E --> E1["Apply Branding
(logo, colors, footer)"] E1 --> E2["Format Line Items
+ Tax Breakdown"] E2 --> E3["Render PDF
invoice_ORD-12345.pdf"] D --> F["Branch 2:
Generate Packing Slip"] F --> F1["Strip Pricing Info"] F1 --> F2["Add Pick Locations
+ Bin Numbers"] F2 --> F3["Add Warehouse
Barcode"] F3 --> F4["Render PDF
packslip_ORD-12345.pdf"] D --> G["Branch 3:
Generate Shipping Label"] G --> G1{"SWITCH:
Carrier?"} G1 -- FedEx --> G2["Call FedEx API"] G1 -- UPS --> G3["Call UPS API"] G1 -- USPS --> G4["Call USPS API"] G2 --> G5["Receive Tracking #
+ Label Image"] G3 --> G5 G4 --> G5 G5 --> G6["Render Label
label_ORD-12345.png"] E3 --> H["JOIN"] F4 --> H G6 --> H H --> I["Bundle 3 Files
into Order Package"] I --> J["Upload to S3
orders/ORD-12345/"] J --> K["FORK (2 Branches)"] K --> L["Email Invoice
to Customer"] K --> M["Send Slip + Label
to Warehouse Printer"] L --> N["JOIN"] M --> N N --> O["Update Order Status:
Ready to Ship"] style A fill:#4CAF50,color:#fff style D fill:#2196F3,color:#fff style G1 fill:#FF9800,color:#fff style H fill:#2196F3,color:#fff style K fill:#2196F3,color:#fff style N fill:#2196F3,color:#fff style O fill:#9C27B0,color:#fff ``` ### Files Produced | Stage | File | Format | |-------|------|--------| | Invoice | `invoice_ORD-12345.pdf` | PDF | | Packing Slip | `packslip_ORD-12345.pdf` | PDF | | Shipping Label | `label_ORD-12345.png` | 4×6 ZPL/PNG | ### Conductor Primitives FORK/JOIN, SWITCH, HTTP, INLINE, SUB_WORKFLOW --- ## 5. Enterprise Video Surveillance Archival & Alert Pipeline A network of security cameras streams footage to edge servers. Conductor orchestrates the pipeline: ingest video segments, run AI-based anomaly detection, generate alert clips with annotations, archive raw footage with retention policies, and produce daily summary reports. ### Workflow ```mermaid flowchart TD A["Camera Feed:
60s Segment Arrives
on Edge Server"] --> B["INLINE Task:
Extract Metadata
(camera ID, timestamp,
resolution)"] B --> C["Upload Raw Segment
to Cold Storage
(S3 Glacier)"] C --> D["HTTP Task:
AI Anomaly Detection
Model Inference"] D --> E{"SWITCH:
Anomaly Detected?"} E -- No --> F["Log: Normal
Update Daily Counter"] E -- Yes --> G["FORK (3 Branches)"] G --> H["Branch 1:
Clip 30s Around
Anomaly Timestamp"] H --> H1["Overlay Bounding
Boxes + Labels"] H1 --> H2["Render Alert Clip
alert_CAM04_1712345678.mp4"] G --> I["Branch 2:
Generate Alert
Snapshot"] I --> I1["Extract Best Frame"] I1 --> I2["Annotate with
Detection Metadata"] I2 --> I3["Save Snapshot
alert_CAM04_1712345678.jpg"] G --> J["Branch 3:
Create Incident
Report"] J --> J1["LLM_TEXT_COMPLETE:
Summarize Event"] J1 --> J2["Generate PDF
incident_1712345678.pdf"] H2 --> K["JOIN"] I3 --> K J2 --> K K --> L["Upload Alert Bundle
to Hot Storage (S3)"] L --> M["HTTP Task:
Push Notification
to Security Team"] M --> N["Log Incident
to SIEM"] F --> O["TIMER:
End of Day?"] N --> O O --> P["DO_WHILE:
Aggregate All
Camera Logs"] P --> Q["Generate Daily
Summary Report PDF"] Q --> R["Apply Retention
Policy (90-day
hot → cold → delete)"] R --> S["Email Daily Report
to Facility Manager"] style A fill:#4CAF50,color:#fff style E fill:#FF9800,color:#fff style G fill:#2196F3,color:#fff style K fill:#2196F3,color:#fff style O fill:#FF5722,color:#fff style S fill:#9C27B0,color:#fff ``` ### Files Produced | Stage | File | Format | |-------|------|--------| | Raw Segment | `raw_CAM04_1712345678.mp4` | MP4 (60s) | | Alert Clip | `alert_CAM04_1712345678.mp4` | MP4 (30s, annotated) | | Alert Snapshot | `alert_CAM04_1712345678.jpg` | JPEG (annotated) | | Incident Report | `incident_1712345678.pdf` | PDF | | Daily Summary | `daily_report_2026-04-08.pdf` | PDF | ### Conductor Primitives FORK/JOIN, SWITCH, DO_WHILE, TIMER, LLM_TEXT_COMPLETE, HTTP, INLINE --- *Generated for Conductor OSS file management use case exploration.*