docs: update README for PO and work order KB syncs
ref #4 — documents the new po-sync and workorder-sync Lambdas, EventBridge schedules, DynamoDB data sources, and manual trigger instructions.
This commit is contained in:
parent
1dc275dee4
commit
8c71d8267c
1 changed files with 12 additions and 3 deletions
15
README.md
15
README.md
|
|
@ -18,14 +18,15 @@ slack-processor Lambda ← calls Bedrock Agent, logs to DynamoDB, posts r
|
|||
│
|
||||
▼
|
||||
Bedrock Agent (Claude Sonnet 4.5)
|
||||
├── Knowledge Base (AOSS + S3) ← SA8000 docs, SOPs, employee handbook, Notion pages
|
||||
├── Knowledge Base (AOSS + S3) ← SA8000 docs, SOPs, employee handbook, Notion pages, POs, work orders
|
||||
├── QBO_Lookup action group ← QuickBooks vendor search
|
||||
└── Google_Maps_Lookup action group ← fallback vendor search
|
||||
|
||||
EventBridge (daily 02:00 UTC)
|
||||
│
|
||||
▼
|
||||
notion-sync Lambda ← exports Office Operations Notion pages → S3 → KB ingestion
|
||||
├── notion-sync Lambda ← exports Office Operations Notion pages → S3 → KB ingestion
|
||||
├── po-sync Lambda ← exports purchase-orders DynamoDB → S3 → KB ingestion
|
||||
└── workorder-sync Lambda ← exports WorkOrders + Comments DynamoDB → S3 → KB ingestion
|
||||
```
|
||||
|
||||
### Vendor Query Priority
|
||||
|
|
@ -43,6 +44,8 @@ notion-sync Lambda ← exports Office Operations Notion pages → S3
|
|||
| Embeddings | Amazon Titan Embed Text V2 (1024 dimensions) |
|
||||
| Vector Store | OpenSearch Serverless (VECTORSEARCH) |
|
||||
| Conversation Log | DynamoDB `seahaven-conversations` (90-day TTL) |
|
||||
| PO Data Source | DynamoDB `purchase-orders` (via po-ingest) |
|
||||
| Work Order Data Source | DynamoDB `WorkOrders` + `WorkOrderComments` (via workorder-ingest) |
|
||||
| Webhook URL | `https://bot.seahaven.com/slack/events` |
|
||||
|
||||
## Prerequisites
|
||||
|
|
@ -143,12 +146,16 @@ lib/
|
|||
slack-handler.ts API Gateway + webhook/processor Lambdas
|
||||
conversation-log.ts DynamoDB table
|
||||
notion-sync.ts EventBridge daily cron + notion-sync Lambda + Secrets Manager
|
||||
po-sync.ts EventBridge daily cron + po-sync Lambda
|
||||
workorder-sync.ts EventBridge daily cron + workorder-sync Lambda
|
||||
lambda/
|
||||
slack-webhook/ Verifies Slack signature, fires processor async
|
||||
slack-processor/ Calls agent, writes DynamoDB, posts Slack reply
|
||||
qbo-lookup/ Bedrock action group — QuickBooks vendor search
|
||||
maps-lookup/ Bedrock action group — Google Maps Places search
|
||||
notion-sync/ Daily Notion → S3 export, triggers KB ingestion
|
||||
po-sync/ Daily purchase-orders DynamoDB → S3 export, triggers KB ingestion
|
||||
workorder-sync/ Daily WorkOrders DynamoDB → S3 export, triggers KB ingestion
|
||||
scripts/
|
||||
create-aoss-index.ts Manual fallback for AOSS index creation (not needed in normal deploy)
|
||||
```
|
||||
|
|
@ -157,4 +164,6 @@ scripts/
|
|||
|
||||
- **QBO refresh token** expires after 100 days of inactivity. Rotate via the [Intuit OAuth Playground](https://developer.intuit.com/app/developer/playground) and update the `seahaven/qbo/oauth` secret.
|
||||
- **Notion sync** runs daily at 02:00 UTC automatically. To trigger an immediate sync, invoke `seahaven-notion-sync` manually via the Lambda console or CLI.
|
||||
- **PO sync** runs daily at 02:00 UTC. Scans the `purchase-orders` DynamoDB table (from [po-ingest](https://github.com/Sea-Haven-Industries/po-ingest)) and exports each PO as markdown to the KB. Manual trigger: invoke `seahaven-po-sync`.
|
||||
- **Work order sync** runs daily at 02:00 UTC. Scans `WorkOrders` and `WorkOrderComments` DynamoDB tables (from [workorder-ingest](https://github.com/Sea-Haven-Industries/workorder-ingest)) and exports each work order + comment history as markdown to the KB. Manual trigger: invoke `seahaven-workorder-sync`.
|
||||
- **KB sync for manual S3 uploads** (non-Notion docs) must still be triggered manually after uploading new documents to the S3 bucket.
|
||||
|
|
|
|||
Reference in a new issue