Перейти к содержанию
НОВОЕМаркетплейс и ваша команда: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / Финансы, счета и бухгалтерия

Финансы, счета и бухгалтерия

Маршрутизация согласований закупок по сумме и риску поставщика с Postgres и Slack

Запускается вручную: проверяет заявку на закупку по уровням сумм, бюджетам отделов и 30-дневной истории поставщика, затем направляет её нужным согласующим по email или в Slack.

Что делает

## Purchase Approval by Spend Limit, Department and Vendor Risk ### How it works A purchase request is evaluated against policy and routed to exactly the approvals it needs. - Spend limits: tiers decide the approval levels (default: up to 500 USD auto-approve, up to 5k manager, up to 25k manager + finance, above that manager + finance + CFO). Spend with the same vendor in the last 30 days is added, so splitting an order does not avoid a tier. - Department: unknown or frozen departments are rejected. Requests that exceed the remaining department budget add finance. If the requester is the department manager, finance approves instead (no self-approval). - Vendor risk: blocked vendors are rejected. Unknown or unapproved vendors need procurement. High risk adds procurement and security review and is never auto-approved. Medium risk adds procurement above a threshold. Approvers get an email with approve / reject links and decide one level at a time. No answer means a reminder (default every 24h, twice), then the request expires. Every step is audited. Approved requests get a PO number and the amount is committed to the department budget. ### Setup steps - Add Postgres and SMTP (email) credentials, then run the manual setup once. - Edit Set Approval Policy: spend tiers, approver emails, thresholds, currency rates, reminders, sender email, Slack webhook. - Replace the demo vendors and departments with your own data. - Activate the workflow (the approval links need an active workflow and a reachable n8n URL), then test with POST /purchase-request: {"requesterEmail":"a@b.com","department":"engineering","vendorId":"cloudco","amount":8000,"currency":"USD","description":"Annual licence"} ### Layout 1 Setup 2-5 Intake, policy, routing, finalize 6 Approval chain

Шаги

  1. Manual Trigger - Run Setup Once
  2. Postgres - Create Approval Tables
  3. Webhook - Purchase Request
  4. Set Approval Policy
  5. Code - Validate & Normalize Request
  6. Request Valid?
  7. Respond - Validation Error
  8. Postgres - Load Vendor, Budget & History
  9. Code - Evaluate Approval Policy
  10. Postgres - Save Request
  11. Respond - Request Received
  12. Switch - Route Policy Decision
  13. Set Final - Auto Approved
  14. Set Final - Policy Rejected

Всего шагов: 24.

Похожие автоматизации