enModule GuidesWorkflows & Automation

Workflows & Automation

XBuddy’s Automation module is the nerve center of your business operations — combining two distinct but complementary systems: Workflow Automation (rule-based approval chains and policies) and the AI Proactive Layer (intelligent agents that monitor, analyze, and act across all modules).

Navigate to Automation in the main nav to access: Workflow Builder, AI Scenarios, AI Feed, AI Suggestions, AI Insights, and Agent Settings.


Two Pillars

PillarWhat it isBest for
Workflow AutomationRule-based triggers, approval chains, delegation, and auto-policiesStructured approval flows with human sign-off requirements
AI Proactive Layer210+ agents that observe data, surface findings, and act on your behalfContinuous monitoring, anomaly detection, recommendations

AI Proactive Layer

The Proactive Layer surfaces AI intelligence across four views under Automation:

Scenarios

Pre-built playbooks that bundle 2–5 agents tuned for a specific business situation. Enable a scenario to activate all its agents with recommended autonomy defaults.

Example scenarios:

  • Cash Flow Crunch — activates Cash Flow Forecaster, AR Aging Intelligence, Dunning Effectiveness Monitor
  • Payroll Risk — activates Payroll Readiness Checker, BHXH Reconciliation, PIT Compliance Checker
  • Deal Pipeline Health — activates Deal Coach, Lead Scorer, Quote Followup Agent

How to enable: Automation → Scenarios → toggle ON → optionally customize individual agent autonomy.

AI Feed

Real-time stream of all agent activity: what ran, what was found, what was acted on. Filter by domain, agent, date range, or status.

  • Green = action created / executed
  • Amber = alert or warning issued
  • Blue = record updated
  • Grey = skipped (no findings)

Suggestions

The pending approval queue for AI recommendations. Populated when agents run in Notify or Semi-auto mode.

Each suggestion card includes:

  • Agent name and the record it analyzed
  • Recommended action (with reasoning)
  • Confidence score
  • Approve / Dismiss / Snooze buttons

Supports bulk approve/dismiss for high-volume queues.

Insights

Weekly cross-domain executive summary generated automatically (or on demand). Combines findings from Finance, Sales, HR, and Operations agents into a narrative with charts. Exportable as PDF.


Workflow Automation

Key Features

  • Visual Workflow Builder — drag-and-drop steps: approval, parallel approval, AI decision, condition branch, auto-action, and notify-only
  • 28+ pre-built approval templates — covering Finance, Procurement, HR, CRM, Manufacturing, Quality, OKR, and more
  • Automation Policies — JSONLogic-based rules that auto-approve, auto-reject, or route requests to AI without human intervention
  • Delegation Management — 25 system delegation templates; rules activate automatically based on date ranges and subject type
  • Escalation Engine — SLA-based escalation to skip-level manager if approver does not act within configured time
  • Parallel & Serial Chains — mix serial (A → B → C) and parallel (A AND B must approve) steps in one workflow
  • AI Decision Step — route to AI scoring engine; auto-decide based on score threshold
  • Complete Audit Trail — every approval, rejection, delegation, and escalation event timestamped and immutable
  • Mobile-friendly — approve, reject, or request changes from any device via push notification
📸

[Screenshot: Workflows — Visual Workflow Builder]

Placeholder — will be replaced with actual screenshot

[Video: Workflows — Building Approval Flows in XBuddy]

Watch on YouTube → @XBuddy (placeholder)

Getting Started

  1. Go to Automation → Workflow Builder and click New Workflow
  2. Choose a pre-built template or start from scratch
  3. Configure the Trigger — which entity and event starts the workflow (e.g., “Invoice submitted for approval”)
  4. Add Steps — approvers, conditions, or automatic actions
  5. Set SLA & Escalation rules for each approval step
  6. Activate the workflow and test it with a sample record from any module

Workflow Step Types

Step TypeDescriptionUse When
ApprovalSingle approver must decideStandard one-person sign-off
Parallel ApprovalMultiple approvers simultaneously; all must approveBoard sign-off, dual control
ConditionBranch based on record values (JSONLogic)Route by amount, department, or risk score
AI DecisionAI scores the request and decides based on thresholdHigh-volume, low-risk routing
Auto ActionExecutes automatically — update field, send email, create taskPost-approval side effects
Notify OnlyInforms recipients without blocking the workflowFYI notifications, CC chains

Approval Templates

XBuddy ships with 28+ pre-configured approval templates organized by domain:

Finance & Procurement

TemplateStepsTrigger
Invoice ApprovalFinance Manager → CFO (>$10K)Invoice submitted
Budget ApprovalDept Head → Finance → CFOBudget request
CapEx ApprovalManager → Finance → CEOCapital expenditure
Credit Note ApprovalFinance ManagerCredit note created
Purchase Order ApprovalDept Head → ProcurementPO submitted
Vendor Payment ApprovalFinance ManagerPayment batch
RFQ ApprovalProcurement ManagerRFQ submitted
Vendor OnboardingProcurement → LegalNew vendor

HR & People

TemplateStepsTrigger
Recruitment RequisitionHR Manager → Dept HeadJob opening
Salary AdjustmentHR Director → CEOSalary change
Promotion ApprovalManager → HR DirectorPromotion request
Termination ApprovalHR Director → LegalTermination
Overtime RequestDirect ManagerOvertime submitted
Leave ApprovalDirect ManagerLeave request
Payroll RunFinance ManagerPayroll finalized

Operations & Compliance

TemplateStepsTrigger
Project BudgetProject Manager → FinanceBudget request
Contract ApprovalAccount Manager → Legal → ExecutiveContract
Asset PurchaseFinance ManagerAsset request
Asset DisposalAsset Manager → FinanceDisposal request
Inventory Write-offWarehouse → FinanceStock write-off
Quality CAPAQuality ManagerCAPA initiated
Waiver/DeviationQA DirectorWaiver request

CRM & Sales

TemplateStepsTrigger
Quote ApprovalSales ManagerQuote submitted
Large Sales OrderFinance → Sales DirectorOrder >threshold
Contact Data ValidationData StewardNew contact

OKR & Performance

TemplateStepsTrigger
Objective ApprovalManagerOKR submitted
IDP ApprovalManagerDevelopment plan
PIP ApprovalHR DirectorPerformance plan

Escalation Rules

Every approval step can have an SLA with automatic escalation:

  1. Notify — approver gets in-app + email notification immediately
  2. Reminder — configurable reminder (e.g., 12 hours before SLA breach)
  3. Escalate — if SLA breached (default: 24 hours), route to skip-level manager
  4. Hard Escalation — if still unresolved (e.g., 72 hours), flag to admin and block entity

Configure SLA per step in the workflow builder under Step Settings → SLA & Escalation.

Delegation Rules & Templates

Delegation automatically routes approval requests to a delegate when the primary approver is unavailable.

How Delegation Works

  1. Admin or manager creates a Delegation Rule specifying: delegator, delegate, validity period, and which subject types or specific workflows apply
  2. When a workflow reaches an approval step, the engine checks if the approver has an active delegation
  3. If matched, the request routes to the delegate automatically — the delegator is notified
  4. Delegation is time-bounded and expires automatically

System Delegation Templates (25 templates)

XBuddy ships with delegation templates for common scenarios:

CategoryExamples
AbsenceAnnual Leave Coverage (14 days), Sick Leave Emergency, Public Holiday Coverage
TravelBusiness Travel (7 days), International Conference, Field Visit
EmergencyMedical Emergency, Personal Emergency (open-ended)
Finance DomainFinance Manager Absence, CFO Delegation, AP/AR Coverage
HR DomainHR Manager Absence, Recruitment Delegation
CRM DomainAccount Manager Travel, Sales Director Coverage
Operations DomainOperations Manager Absence, Warehouse Manager Coverage

To activate a template, go to Automation → Delegation and click Use Template.

Automation Policies

Automation Policies eliminate repetitive approvals by automatically handling routine requests based on configurable conditions.

Policy Actions

ActionDescriptionExample
Auto-ApproveApprove instantly without human interventionExpense < 500,000 VND by trusted employee
Auto-RejectReject immediately based on violationRequest from blacklisted vendor
Route to AISend to AI decision engine for scoringHigh-value invoice from new supplier
Notify OnlySkip approval, just notifyInformational FYI for small purchases
EscalateJump directly to senior approverBudget overrun >20%

Setting Up a Policy

  1. Go to Automation → Policies and click New Policy
  2. Select the Subject Type (e.g., Expense Claim, Invoice)
  3. Define Conditions using the visual rule builder (amount, vendor, department, etc.)
  4. Choose the Action (auto-approve, auto-reject, route-to-AI, etc.)
  5. Set Priority — lower number = evaluated first; first match wins
  6. Activate the policy

Policies are evaluated before any human approval step. If a policy matches, the workflow acts accordingly and logs the decision for audit.

Conditional Branching Example: Invoice Approval

TRIGGER: Invoice submitted for approval

├─ POLICY CHECK (evaluated first)
│  ├─ IF vendor is blacklisted → AUTO-REJECT
│  └─ IF amount < 1M VND AND trusted vendor → AUTO-APPROVE

└─ WORKFLOW STEPS (if no policy matched)
   ├─ IF amount ≤ 5M VND
   │  └─ Department Manager → approve/reject
   ├─ IF amount 5M–20M VND
   │  └─ Finance Manager → approve/reject
   └─ IF amount > 20M VND
      └─ Finance Manager → CFO (serial chain)
         └─ If CFO absent → AI Decision Engine

Integration Points

Every module in XBuddy can plug into Workflows:

  • Finance — Invoice, expense claim, bill, credit note, and payment approval
  • Procurement — Purchase request, RFQ, PO, and vendor onboarding approval
  • HR — Leave, overtime, recruitment, promotion, salary adjustment, and termination
  • CRM — Quote approval and large sales order review
  • Manufacturing — Work order release and rework authorization
  • Quality — NCR approval, CAPA sign-off, deviation waiver
  • OKR & Performance — Objective, IDP, and PIP approval
  • Knowledge — Article publication approval

FAQ

Q: Can I mix serial and parallel approval steps?
A: Yes. Build a workflow where steps A and B run in parallel, then require C to approve once both A and B have decided. Fully configurable in the builder.

Q: What happens if an approver is on leave?
A: Set up a Delegation Rule before they leave. The system will automatically route to the delegate for the configured validity period. Use a delegation template for common scenarios like annual leave.

Q: Can policies and workflows run together?
A: Policies are evaluated first. If a policy matches (e.g., auto-approve), the workflow skips human steps. If no policy matches, the workflow runs normally.

Q: How do I see all pending approvals across modules?
A: Go to Automation → My Tasks to see all pending approval requests assigned to you, across every module, in one view.

Q: Can I add a comment or annotation when approving?
A: Yes. Every approval action includes an optional comment field. Comments are stored in the audit trail and visible to subsequent approvers and the initiator.

Q: How long are audit logs kept?
A: Permanently. Every approval event, delegation activation, policy match, and escalation is timestamped and immutable. You can export the full audit trail as CSV.

Q: Can I test a workflow without affecting real data?
A: Yes. Use the Test Mode in the workflow builder to run a simulated approval with a test record. Results show which steps would trigger without creating actual approvals.