Skip to content

Flow Name: On Person Account: Assign Fellow buyer group

Last Updated: 2024-10-21 Source Code: On_Person_Account_Assign_Fellow_buyer_group.flow-meta.xml

API Name: On_Person_Account_Assign_Fellow_buyer_group Status: Active Type: Custom Trigger: After Save on Account record when IsPersonAccount = true AND IsBuyer = true AND (Is_a_Fellow__c is changed OR Fellow_Designation__c is changed)

Business Purpose

Automatically manages Fellow buyer group membership for person accounts based on their Fellow designation status. Ensures Fellows are properly assigned to the Fellow buyer group unless they have specific exclusion statuses.

Process Flow

  1. Get Fellow Buyer Group: Looks up the buyer group containing "Fellow" in the name
  2. Check Group Exists: Verifies the Fellow buyer group exists before proceeding
  3. Get Existing Assignment: Checks if person already has Fellow buyer group assignment
  4. Fellow Status Check: Determines if account has Is_a_Fellow__c = true
  5. Designation Validation: Checks if Fellow_Designation__c is "Deceased", "Former", "Inductee", or "Former Chair"
  6. Assignment Management:
  7. If Fellow but has exclusion status: Deletes existing assignment
  8. If Fellow without exclusion status: Creates new assignment if none exists
  9. If not Fellow: Removes any existing Fellow group assignment
📊 Click to view Process Flow Diagram
flowchart TD
    Start([Start: After Save on Account record when IsPersonAccount = true AND IsBuyer = true AND (Is_a_Fellow__c is changed OR Fellow_Designation__c is changed)]) --> Lookup[Lookup Related Data]

    Lookup --> Found{Data<br/>Found?}
    Found -->|No| End([End])
    Found -->|Yes| Calculate[Calculate/Determine Values]

    Calculate --> Update[Update Records]
    Update --> End

    style Start fill:#e1f5ff
    style Lookup fill:#f0e1ff
    style Found fill:#fff4e1
    style Calculate fill:#e1ffe1
    style Update fill:#ffe1e1
    style End fill:#e1f5ff

Key Business Rules

  • Only processes Person Accounts with IsBuyer = true
  • Excludes Fellows with designations: Deceased, Former, Inductee, Former Chair
  • Creates BuyerGroupMember record linking Account to Fellow BuyerGroup
  • Automatically removes assignments when Fellow status changes to excluded categories
  • Only one Fellow buyer group assignment per person account

Dependencies

  • Account object with fields: IsPersonAccount, IsBuyer, Is_a_Fellow__c, Fellow_Designation__c
  • BuyerGroup object with Fellow group record
  • BuyerGroupMember object for group assignments

Changes

PR-27211: Added isBuyer check and updated logic to assign person accounts to Fellow buyer groups only if "Is Fellow" is checked and "Designation type" does not equal Deceased, Former, or Inductee

⚠️ Pre-Go-Live Concerns

CRITICAL - Fix Before Go-Live

  • None identified

HIGH - Address Soon After Go-Live

  • Fellow Group Dependency: Flow will fail silently if Fellow buyer group doesn't exist or name changes
  • Multiple Fellow Groups: Current logic uses "Contains Fellow" which could match multiple groups

MEDIUM - Future Enhancement

  • Add error handling for failed buyer group assignments
  • Consider adding audit trail for Fellow group membership changes
  • Validate buyer group lookup is more specific than "Contains Fellow"

LOW - Monitor

  • Performance impact of multiple decision nodes in flow execution
  • Edge cases with concurrent Fellow status updates

Maintenance Notes

Complex decision tree with multiple conditional branches. Review when Fellow designation values change or new buyer group structures are implemented. Monitor for failed assignments due to missing Fellow buyer group.