Skip to main content

Workflow Examples

Complete Real-World Workflows#

This section provides detailed, production-ready workflow examples that you can adapt for your organization.

Example 1: Purchase Order Approval Workflow#

Business Requirements#

  • POs under $5,000: Auto-approved
  • POs $5,000-$25,000: Manager approval required
  • POs over $25,000: Director approval required
  • Emergency POs: Flag for expedited review
  • Track approval times and approvers

Workflow Configuration#

Name: Purchase Order Approval Workflow Record Type: Purchase Order Initiate On: After Record Submit Trigger Type: Create

States#

State 1: Evaluate PO Amount (Entry State)#

Purpose: Determine approval path based on amount

On Entry Actions:

  1. Set Field: custbody_workflow_status = "Under Review"
  2. Set Field: custbody_submitted_date = {today}
  3. Set Field: custbody_submitted_by = {currentuser}

Transitions:

Transition 1: To "Auto Approved"

  • Condition: {amount} < 5000 AND {custbody_emergency} != 'T'
  • Priority: 1

Transition 2: To "Manager Review"

  • Condition: {amount} >= 5000 AND {amount} < 25000
  • Priority: 2

Transition 3: To "Director Review"

  • Condition: {amount} >= 25000
  • Priority: 3

Transition 4: To "Emergency Review"

  • Condition: {custbody_emergency} = 'T'
  • Priority: 4

State 2: Auto Approved#

Purpose: Automatically approve low-value POs

On Entry Actions:

  1. Set Field: approvalstatus = "Approved"

  2. Set Field: custbody_approved_by = "System Auto-Approval"

  3. Set Field: custbody_approved_date = {today}

  4. Set Field: custbody_workflow_status = "Approved"

  5. Send Email to Requester

    • Subject: "PO {tranid} Auto-Approved"
    • Body:
    Your purchase order has been automatically approved.
    PO Number: {tranid}Vendor: {entity}Amount: {total}
    View PO: {url}
  6. Send Email to Purchasing

    • Subject: "New Approved PO: {tranid}"

Workflow Exit: Yes

State 3: Manager Review#

Purpose: Manager reviews and approves/rejects

On Entry Actions:

  1. Set Field: approvalstatus = "Pending Approval"

  2. Set Field: custbody_workflow_status = "Awaiting Manager Approval"

  3. Create Task

    • Title: "Approve PO {tranid}"
    • Assigned To: {custbody_approving_manager}
    • Due Date: {today} + 2
    • Priority: High
    • Message: "Please review and approve PO {tranid} for {total}"
  4. Send Email to Manager

    • Subject: "Action Required: Approve PO {tranid}"
    • Body:
    A purchase order requires your approval:
    PO Number: {tranid}Vendor: {entity}Amount: {total}Requestor: {custbody_submitted_by}
    Please review and approve/reject: {url}

On Field Changed: approvalstatus

If approvalstatus = "Approved":

  1. Set Field: custbody_approved_by = {currentuser}
  2. Set Field: custbody_approved_date = {today}
  3. Set Field: custbody_approval_time = {today} - {custbody_submitted_date}
  4. Send Email to Requester: "PO Approved"
  5. Send Email to Purchasing: "Process PO {tranid}"
  6. Go To State: "Approved"

If approvalstatus = "Rejected":

  1. Set Field: custbody_rejected_by = {currentuser}
  2. Set Field: custbody_rejected_date = {today}
  3. Send Email to Requester: "PO Rejected" (include reason)
  4. Go To State: "Rejected"

Transition: Escalate if Overdue

  • Trigger: On Schedule (Daily)
  • Condition: {today} - {custbody_submitted_date} > 2
  • Actions:
    1. Send Email to Director
    2. Create Task for Director
    3. Set Field: custbody_escalated = "T"

State 4: Director Review#

Purpose: Director approval for high-value POs

Similar to Manager Review, but:

  • Assigned to Director
  • Due date: {today} + 1 (faster turnaround)
  • Higher priority notifications
  • Escalation after 1 day instead of 2

State 5: Emergency Review#

Purpose: Fast-track emergency POs

On Entry Actions:

  1. Set Field: custbody_workflow_status = "EMERGENCY REVIEW"
  2. Create Task
    • Assigned To: Director
    • Due Date: {today} + 0.5 (12 hours)
    • Priority: Highest
  3. Send Email to Director
    • Subject: "๐Ÿšจ EMERGENCY PO Approval Needed: {tranid}"
    • Priority: High
  4. Send Notification to Purchasing Manager
  5. Set Field: custbody_emergency_flagged_date = {now}

On Field Changed: Similar to Manager Review

State 6: Approved (Exit State)#

Purpose: Final approved state

On Entry Actions:

  1. Set Field: custbody_workflow_status = "Completed - Approved"
  2. Set Field: custbody_completion_date = {today}
  3. Update Metrics Custom Record (via script if needed)

Workflow Exit: Yes

State 7: Rejected (Exit State)#

Purpose: Final rejected state

On Entry Actions:

  1. Set Field: custbody_workflow_status = "Completed - Rejected"
  2. Set Field: custbody_completion_date = {today}
  3. Set Field: memo = {memo} || "\n\nRejected on " || {today} || " by " || {currentuser}

Workflow Exit: Yes

Testing Checklist#

  • PO for $3,000: Auto-approves
  • PO for $10,000: Routes to manager
  • PO for $30,000: Routes to director
  • Emergency PO: Routes to emergency review
  • Manager approval: Updates status and sends emails
  • Manager rejection: Updates status and notifies requester
  • Escalation: Triggers after 2 days
  • All emails send correctly
  • All fields update properly

Example 2: Sales Order Customer Onboarding#

Business Requirements#

  • New customer orders require additional processing
  • Collect W-9 and setup information
  • Assign account manager
  • Schedule kickoff meeting
  • Track onboarding progress

Workflow Configuration#

Name: New Customer Onboarding Workflow Record Type: Sales Order Initiate On: After Record Submit Trigger Type: Create

States#

State 1: Check if New Customer (Entry State)#

On Entry Actions:

  1. Set Field: custbody_onboarding_status = "Checking Customer Status"

Transitions:

To "Existing Customer Processing":

  • Condition: {entity.datecreated} < ({today} - 30)

To "New Customer Onboarding":

  • Condition: {entity.datecreated} >= ({today} - 30)

State 2: Existing Customer Processing#

On Entry Actions:

  1. Set Field: custbody_onboarding_status = "Standard Processing"
  2. Send Email: Standard order confirmation
  3. Create Task: Standard fulfillment task

Workflow Exit: Yes

State 3: New Customer Onboarding#

On Entry Actions:

  1. Set Field: custbody_onboarding_status = "New Customer - Onboarding Started"

  2. Set Field on Customer: custentity_onboarding_status = "In Progress"

  3. Set Field on Customer: custentity_onboarding_start_date = {today}

  4. Send Email to Customer

    • Subject: "Welcome to {company}!"
    • Body: Welcome message with next steps
  5. Create Task: Request W-9

    • Assigned To: Accounting Team
    • Due: {today} + 5
    • Priority: High
    • Message: "Request W-9 from {entity.companyname}"
  6. Create Task: Schedule Kickoff Meeting

    • Assigned To: {salesrep}
    • Due: {today} + 3
    • Priority: High
    • Message: "Schedule kickoff meeting with {entity.companyname}. Contact: {entity.email}, {entity.phone}"
  7. Create Task: Assign Account Manager

    • Assigned To: Sales Manager
    • Due: {today} + 2
    • Message: "Assign account manager for new customer: {entity.companyname}"
  8. Create Task: Setup Customer Portal Access

    • Assigned To: IT Support
    • Due: {today} + 7
    • Message: "Setup portal access for {entity.email}"
  9. Create Custom Record: Onboarding Checklist

    • Customer: {entity}
    • Sales Order: {current record}
    • Status: In Progress
    • Items: W-9, Meeting, Account Manager, Portal
  10. Send Notification to Sales Team

    • Subject: "New Customer Alert: {entity.companyname}"
    • Message: Include customer details and order info

On Field Changed: custbody_onboarding_complete

If custbody_onboarding_complete = "T":

  1. Set Field on Customer: custentity_onboarding_status = "Completed"
  2. Set Field on Customer: custentity_onboarding_completion_date = {today}
  3. Set Field: custbody_onboarding_status = "Completed"
  4. Send Email to Sales Rep: "Onboarding completed for {entity}"
  5. Go To State: "Onboarding Complete"

Transition: Check Progress

  • Trigger: On Schedule (Daily)
  • Condition: Always
  • Actions:
    1. If {today} - {trandate} > 7 and not complete: Send reminder email to sales manager

State 4: Onboarding Complete#

On Entry Actions:

  1. Set Field: custbody_onboarding_status = "Complete - Processing Order"
  2. Send Email: Final welcome email with resources
  3. Create Task: Begin standard fulfillment
  4. Calculate and log onboarding duration

Workflow Exit: Yes


Example 3: Scheduled Invoice Payment Reminders#

Business Requirements#

  • Send first reminder 7 days after due date
  • Send second reminder 14 days after due date
  • Escalate to collections after 30 days
  • Track reminder history
  • Don't send if payment received

Workflow Configuration#

Name: Invoice Payment Reminder Workflow Record Type: Invoice Initiate On: On Schedule Run: Daily at 8:00 AM

States#

State 1: Check Invoice Status (Entry State)#

On Entry Actions:

  1. (No actions - evaluation only)

Transitions:

To "First Reminder":

  • Condition:
    {status} = 'Open'AND {amountremaining} > 0AND ({today} - {duedate}) = 7AND {custbody_first_reminder_sent} != 'T'

To "Second Reminder":

  • Condition:
    {status} = 'Open'AND {amountremaining} > 0AND ({today} - {duedate}) = 14AND {custbody_second_reminder_sent} != 'T'

To "Collections Escalation":

  • Condition:
    {status} = 'Open'AND {amountremaining} > 0AND ({today} - {duedate}) >= 30AND {custbody_collections_notified} != 'T'

To "Exit" (Default):

  • Condition: None (catches all other cases)

State 2: First Reminder#

On Entry Actions:

  1. Set Field: custbody_first_reminder_sent = "T"

  2. Set Field: custbody_first_reminder_date = {today}

  3. Set Field: custbody_days_overdue = {today} - {duedate}

  4. Send Email to Customer

    • Recipient: {entity.email}
    • CC: {entity.custentity_ap_contact_email}
    • Subject: "Payment Reminder - Invoice {tranid}"
    • Body:
    Dear {entity.companyname},
    This is a friendly reminder that Invoice {tranid} is now {custbody_days_overdue} days overdue.
    Invoice Details:- Invoice Number: {tranid}- Invoice Date: {trandate}- Due Date: {duedate}- Amount Due: {amountremaining}
    If you have already sent payment, please disregard this notice.
    If you have any questions, please contact us.
    View Invoice: {url}
    Thank you,Accounts Receivable Team
  5. Set Field: memo = {memo} || "\nFirst reminder sent: " || {today}

  6. Create Activity Record (Phone Call/Note)

    • Company: {entity}
    • Message: "First payment reminder sent for invoice {tranid}"
    • Assigned To: {salesrep}

Workflow Exit: Yes

State 3: Second Reminder#

On Entry Actions:

  1. Set Field: custbody_second_reminder_sent = "T"

  2. Set Field: custbody_second_reminder_date = {today}

  3. Set Field: custbody_days_overdue = {today} - {duedate}

  4. Send Email to Customer (More urgent tone)

    • Subject: "URGENT: Payment Reminder - Invoice {tranid}"
    • Body: Include original invoice details, emphasize urgency
  5. Send Email to Sales Rep

    • Subject: "Customer Payment Overdue: {entity.companyname}"
    • Body: Alert to follow up with customer
  6. Create Task for Sales Rep

    • Title: "Follow up on overdue invoice {tranid}"
    • Due: {today} + 2
    • Priority: High
    • Message: "Invoice {tranid} is {custbody_days_overdue} days overdue. Please contact customer."
  7. Set Field: memo = {memo} || "\nSecond reminder sent: " || {today}

Workflow Exit: Yes

State 4: Collections Escalation#

On Entry Actions:

  1. Set Field: custbody_collections_notified = "T"

  2. Set Field: custbody_collections_escalation_date = {today}

  3. Set Field: custbody_days_overdue = {today} - {duedate}

  4. Set Field on Customer: custentity_credit_hold = "T"

  5. Send Email to Customer (Final notice)

    • Subject: "FINAL NOTICE - Invoice {tranid} - Collections"
    • Body: Formal final notice
  6. Create Task for Collections Manager

    • Title: "Collections: {entity.companyname} - Invoice {tranid}"
    • Due: {today} + 1
    • Priority: Highest
    • Message:
    Invoice {tranid} is {custbody_days_overdue} days overdue.
    Customer: {entity.companyname}Amount: {amountremaining}Due Date: {duedate}
    Customer has been placed on credit hold.Previous reminders sent:- First: {custbody_first_reminder_date}- Second: {custbody_second_reminder_date}
    Please initiate collections process.
  7. Send Email to Sales Manager and CFO

    • Subject: "Collections Escalation: {entity.companyname}"
    • Body: Summary of situation
  8. Create Custom Record: Collections Case

    • Customer: {entity}
    • Invoice: {current record}
    • Amount: {amountremaining}
    • Days Overdue: {custbody_days_overdue}
    • Status: Open
  9. Set Field: memo = {memo} || "\nEscalated to collections: " || {today}

Workflow Exit: Yes


Example 4: Item Reorder Point Workflow#

Business Requirements#

  • Monitor inventory levels daily
  • Auto-create purchase orders when below reorder point
  • Consider lead time and safety stock
  • Notify purchasing team
  • Track reorder history

Workflow Configuration#

Name: Automatic Inventory Reorder Record Type: Inventory Item Initiate On: On Schedule Run: Daily at 6:00 AM

States#

State 1: Check Inventory Levels (Entry State)#

On Entry Actions:

  1. Calculate: custitem_days_of_supply = {quantityavailable} / {custitem_avg_daily_usage}

Transitions:

To "Create Purchase Order":

  • Condition:
    {quantityavailable} <= {custitem_reorder_point}AND {custitem_auto_reorder} = 'T'AND {quantityonorder} = 0AND {isinactive} = 'F'

To "Already on Order":

  • Condition:
    {quantityavailable} <= {custitem_reorder_point}AND {quantityonorder} > 0

To "Stock Adequate" (Exit):

  • Condition: {quantityavailable} > {custitem_reorder_point}

State 2: Create Purchase Order#

On Entry Actions:

  1. Calculate Order Quantity:

    • Formula: {custitem_reorder_quantity} OR
    • ({custitem_reorder_point} + {custitem_safety_stock}) - {quantityavailable}
  2. Create Record: Purchase Order

    • Vendor: {custitem_preferred_vendor}
    • Item: {current item}
    • Quantity: Calculated order quantity
    • Rate: {custitem_last_purchase_price}
    • Expected Receipt Date: {today} + {custitem_lead_time_days}
    • Memo: "Auto-generated reorder - Item below reorder point"
    • Department: Purchasing
    • Location: Primary location
  3. Set Field: custitem_last_reorder_date = {today}

  4. Set Field: custitem_last_reorder_quantity = calculated quantity

  5. Set Field: custitem_reorder_count = {custitem_reorder_count} + 1

  6. Send Email to Purchasing Team

    • Subject: "Auto-Generated PO for Item: {displayname}"
    • Body:
    A purchase order has been automatically created:
    Item: {displayname}Current Stock: {quantityavailable}Reorder Point: {custitem_reorder_point}Order Quantity: {calculated_qty}Vendor: {custitem_preferred_vendor}Expected Delivery: {expected_date}
    PO Number: {po_tranid}
    Please review: {po_url}
  7. Send Notification to Inventory Manager

    • Alert about low stock and reorder
  8. Create Custom Record: Reorder History Log

    • Item: {current item}
    • Date: {today}
    • Quantity Available: {quantityavailable}
    • Quantity Ordered: {calculated_qty}
    • Vendor: {custitem_preferred_vendor}
    • PO Number: {po_tranid}

Workflow Exit: Yes

State 3: Already on Order#

On Entry Actions:

  1. Set Field: custitem_last_checked_date = {today}

  2. Send Email to Purchasing Team (if critical)

    • Condition: {quantityavailable} < {custitem_safety_stock}
    • Subject: "CRITICAL: Item {displayname} below safety stock"
    • Body: Alert with current status and existing order info
  3. Create Task (if critical)

    • Condition: {quantityavailable} = 0
    • Title: "URGENT: Out of Stock - {displayname}"
    • Assigned To: Purchasing Manager
    • Due: {today}
    • Priority: Highest

Workflow Exit: Yes

State 4: Stock Adequate (Exit State)#

On Entry Actions:

  1. Set Field: custitem_last_checked_date = {today}
  2. No further action needed

Workflow Exit: Yes


Example 5: Employee Onboarding Workflow#

Business Requirements#

  • Automate new employee setup
  • Assign tasks to HR, IT, and managers
  • Track completion of onboarding steps
  • Send welcome communications
  • Schedule orientation and training

Workflow Configuration#

Name: Employee Onboarding Workflow Record Type: Employee Initiate On: After Record Submit Trigger Type: Create

States#

State 1: Initiate Onboarding (Entry State)#

On Entry Actions:

  1. Set Field: custentity_onboarding_status = "Started"

  2. Set Field: custentity_onboarding_start_date = {today}

  3. Set Field: custentity_start_date_calculated = {hiredate}

  4. Send Email to New Employee

    • Subject: "Welcome to {company}!"
    • Body: Welcome message, what to expect, first day info
  5. Send Email to Manager

    • Subject: "New Team Member Starting: {firstname} {lastname}"
    • Body: Prepare for new hire, responsibilities
  6. Create Custom Record: Onboarding Checklist

    • Employee: {current employee}
    • Status: In Progress
    • Start Date: {today}
    • Expected Completion: {hiredate}

Immediate Transition to: "HR Tasks"

State 2: HR Tasks#

On Entry Actions:

  1. Create Task: Complete I-9 and Tax Forms

    • Assigned To: HR Coordinator
    • Due: {hiredate} - 2
    • Priority: High
    • Message: "Complete employment verification and tax documents for {firstname} {lastname}"
  2. Create Task: Benefits Enrollment

    • Assigned To: Benefits Administrator
    • Due: {hiredate} + 5
    • Message: "Schedule benefits enrollment meeting with {firstname}"
  3. Create Task: Setup Payroll

    • Assigned To: Payroll Administrator
    • Due: {hiredate} - 1
    • Message: "Add {firstname} {lastname} to payroll system. Department: {department}, Rate: {laborcost}"
  4. Create Task: Schedule Orientation

    • Assigned To: HR Manager
    • Due: {hiredate} - 3
    • Message: "Schedule new hire orientation for {firstname} starting on {hiredate}"
  5. Create Task: Prepare Employee Handbook

    • Assigned To: HR Coordinator
    • Due: {hiredate} - 1
    • Message: "Prepare and send employee handbook to {email}"
  6. Set Field: custentity_hr_tasks_assigned = "T"

  7. Set Field: custentity_hr_tasks_date = {today}

On Field Changed: custentity_hr_complete

If custentity_hr_complete = "T":

  1. Set Field: custentity_hr_completion_date = {today}
  2. Send Email to HR Manager: "HR onboarding completed for {firstname}"
  3. Check if ready to proceed to IT setup
  4. Go To State: "IT Tasks"

State 3: IT Tasks#

On Entry Actions:

  1. Create Task: Create Network Account

    • Assigned To: IT Administrator
    • Due: {hiredate} - 2
    • Priority: High
    • Message:
    Create network account for {firstname} {lastname}Username: {email}Department: {department}Manager: {supervisor}Start Date: {hiredate}
  2. Create Task: Setup Email Account

    • Assigned To: IT Administrator
    • Due: {hiredate} - 2
    • Message: "Create email account: {email}"
  3. Create Task: Prepare Workstation

    • Assigned To: IT Support
    • Due: {hiredate} - 1
    • Message:
    Prepare workstation for {firstname} {lastname}Location: {location}Computer: Standard setup for {title}Software: {custentity_required_software}
  4. Create Task: Setup Phone Extension

    • Assigned To: Telecom Administrator
    • Due: {hiredate} - 1
    • Message: "Setup phone extension and voicemail"
  5. Create Task: Grant System Access

    • Assigned To: IT Security
    • Due: {hiredate}
    • Message:
    Grant system access for {firstname} {lastname}Role: {title}Department: {department}Required Systems: {custentity_system_access_needed}
  6. Create Task: Order Equipment

    • Assigned To: IT Procurement
    • Due: {hiredate} - 5
    • Message: "Order laptop, monitor, peripherals per {department} standards"
  7. Set Field: custentity_it_tasks_assigned = "T"

On Field Changed: custentity_it_complete

If custentity_it_complete = "T":

  1. Set Field: custentity_it_completion_date = {today}
  2. Send Email with login credentials to new employee
  3. Go To State: "Manager Tasks"

State 4: Manager Tasks#

On Entry Actions:

  1. Create Task: Prepare Workspace

    • Assigned To: {supervisor}
    • Due: {hiredate} - 1
    • Message: "Prepare workspace and welcome materials for {firstname}"
  2. Create Task: Plan First Week Schedule

    • Assigned To: {supervisor}
    • Due: {hiredate} - 3
    • Message:
    Plan first week schedule for {firstname} {lastname}- Team introductions- Training sessions- Initial assignments- Check-in meetings
  3. Create Task: Assign Onboarding Buddy

    • Assigned To: {supervisor}
    • Due: {hiredate} - 5
    • Message: "Assign onboarding buddy to help {firstname} during first 30 days"
  4. Create Task: Schedule 1:1 Meetings

    • Assigned To: {supervisor}
    • Due: {hiredate}
    • Message: "Schedule regular 1:1 meetings: Day 1, Week 1, Week 2, Week 4, 90 days"
  5. Send Email to Department Team

    • Subject: "New Team Member Joining: {firstname} {lastname}"
    • Body:
    Please join us in welcoming {firstname} {lastname} to the team!
    Position: {title}Department: {department}Start Date: {hiredate}
    {firstname} will be focusing on {custentity_responsibilities}
    Please stop by and introduce yourself!
  6. Set Field: custentity_manager_tasks_assigned = "T"

On Field Changed: custentity_manager_complete

If custentity_manager_complete = "T":

  1. Go To State: "Training Tasks"

State 5: Training Tasks#

On Entry Actions:

  1. Create Task: Complete Compliance Training

    • Assigned To: {current employee}
    • Due: {hiredate} + 7
    • Priority: High
    • Message: "Complete required compliance training modules"
  2. Create Task: Complete Role-Specific Training

    • Assigned To: Training Coordinator
    • Due: {hiredate} + 14
    • Message: "Schedule and complete {custentity_required_training} for {firstname}"
  3. Create Task: Complete System Training

    • Assigned To: {current employee}
    • Due: {hiredate} + 10
    • Message: "Complete training on required systems: {custentity_system_access_needed}"
  4. Create Task: Shadow Team Members

    • Assigned To: {supervisor}
    • Due: {hiredate} + 5
    • Message: "Arrange shadowing sessions with key team members"
  5. Set Field: custentity_training_tasks_assigned = "T"

On Field Changed: custentity_training_complete

If custentity_training_complete = "T":

  1. Go To State: "30-Day Check-In"

State 6: 30-Day Check-In#

On Entry Actions:

Scheduled Check:

  • Trigger: When {today} = {hiredate} + 30
  1. Create Task: 30-Day Review

    • Assigned To: {supervisor}
    • Due: {hiredate} + 30
    • Priority: High
    • Message:
    Conduct 30-day review with {firstname} {lastname}- How is onboarding going?- Any issues or concerns?- Feedback on process- Update goals and expectations
  2. Send Email to HR

    • Subject: "30-Day Check-In Due: {firstname} {lastname}"
    • Body: Reminder to follow up on onboarding progress
  3. Send Email to Employee

    • Subject: "30-Day Check-In"
    • Body:
    You've completed your first 30 days!
    Your manager will be scheduling a check-in meeting to discuss:- Your experience so far- Any questions or concerns- Goals for the next 60 days
    We hope you're settling in well!

On Field Changed: custentity_30day_checkin_complete

If custentity_30day_checkin_complete = "T":

  1. Go To State: "90-Day Review"

State 7: 90-Day Review#

On Entry Actions:

Scheduled Check:

  • Trigger: When {today} = {hiredate} + 90
  1. Create Task: 90-Day Performance Review

    • Assigned To: {supervisor}
    • Due: {hiredate} + 90
    • Priority: High
    • Message:
    Conduct formal 90-day review with {firstname} {lastname}- Performance assessment- Goal achievement- Areas for development- Career path discussion- Decision on continuing employment
  2. Create Task: Update Performance Record

    • Assigned To: HR Manager
    • Due: {hiredate} + 95
    • Message: "Record 90-day review results in employee file"
  3. Send Email to Employee

    • Subject: "90-Day Review Scheduled"
    • Body: Information about review process

On Field Changed: custentity_90day_review_complete

If custentity_90day_review_complete = "T":

  1. Set Field: custentity_onboarding_status = "Completed"
  2. Set Field: custentity_onboarding_completion_date = {today}
  3. Calculate and log total onboarding duration
  4. Send Email to HR: Onboarding completed successfully
  5. Go To State: "Onboarding Complete"

State 8: Onboarding Complete (Exit State)#

On Entry Actions:

  1. Set Field: custentity_onboarding_status = "Completed"

  2. Update Custom Record: Onboarding Checklist (mark complete)

  3. Send Email to All Stakeholders

    • To: Employee, Manager, HR
    • Subject: "Onboarding Complete: {firstname} {lastname}"
    • Body: Congratulations and next steps
  4. Generate Onboarding Report

    • Summary of all completed tasks
    • Timeline
    • Feedback collected

Workflow Exit: Yes


Testing Workflows#

General Testing Strategy#

  1. Unit Test Each State

    • Test entry actions
    • Test exit actions
    • Test field changed actions
    • Test transitions
  2. Integration Test Full Flow

    • Test complete happy path
    • Test alternative paths
    • Test error conditions
  3. User Acceptance Testing

    • Have actual users test
    • Verify notifications
    • Check usability
  4. Performance Testing

    • Test with realistic data volumes
    • Check execution times
    • Monitor governance

Testing Checklist Template#

Workflow: [Name]Test Date: [Date]Tested By: [Name]
Entry Conditions:[ ] Workflow triggers correctly[ ] Correct record types[ ] Conditions evaluate properly
States:[ ] Each state accessible[ ] Entry actions execute[ ] Exit actions execute[ ] Field changes trigger correctly
Transitions:[ ] All transitions work[ ] Conditions evaluate correctly[ ] Priority order correct[ ] Default path works
Actions:[ ] Emails send correctly[ ] Fields update properly[ ] Records create successfully[ ] Tasks assign correctly[ ] Scripts execute without errors
Edge Cases:[ ] Null values handled[ ] Empty fields handled[ ] Invalid data rejected[ ] Concurrent edits handled
Performance:[ ] Execution completes quickly[ ] No governance errors[ ] Scales with volume
Notifications:[ ] All stakeholders notified[ ] Email content correct[ ] Links work[ ] Attachments included
Documentation:[ ] Workflow documented[ ] Training materials ready[ ] Support team informed

Best Practices from Examples#

Workflow Design#

  1. Clear State Names: Use descriptive names that indicate what's happening
  2. Comprehensive Actions: Don't forget logging, notifications, and tracking
  3. Error Handling: Always have fallback paths
  4. Stakeholder Communication: Keep everyone informed
  5. Audit Trail: Log important changes and decisions

Field Management#

  1. Status Tracking: Use custom fields to track workflow progress
  2. Date Stamps: Record when things happen
  3. User Tracking: Record who did what
  4. Duration Tracking: Calculate time spent in each stage

Communication#

  1. Clear Subject Lines: Make email purpose obvious
  2. Include Context: Provide all relevant information
  3. Actionable Items: Tell recipients what to do
  4. Links: Always include links to records
  5. Professional Tone: Maintain business communication standards

Task Management#

  1. Clear Titles: Make task purpose obvious
  2. Appropriate Due Dates: Consider realistic timeframes
  3. Right Priority: Don't make everything high priority
  4. Detailed Messages: Provide context and instructions
  5. Proper Assignment: Assign to specific users or roles

Troubleshooting Workflows#

Common Issues and Solutions#

Issue: Workflow not triggering

  • Check workflow is Active
  • Verify trigger conditions
  • Review initiate on settings
  • Check record type match

Issue: Actions not executing

  • Verify conditions are met
  • Check execution context
  • Review permissions
  • Check for errors in log

Issue: Emails not sending

  • Verify email addresses
  • Check sender permissions
  • Review email template
  • Check execution log

Issue: Performance problems

  • Reduce number of actions
  • Optimize conditions
  • Consider scheduled workflow
  • Check for circular references

Issue: Unexpected results

  • Review execution log
  • Check field values
  • Verify transition order
  • Test conditions independently

Next Steps#

You now have complete workflow examples covering:

  • Approval processes
  • Customer onboarding
  • Scheduled monitoring
  • Inventory management
  • Employee onboarding