feat(salesforce): Contact trigger to auto-create IT Request Case when Needs_Support__c becomes true #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds Salesforce automation that creates an "IT Request" Case when a Contact's
Needs_Support__ccheckbox field changes fromfalsetotrue. The implementation includes:Needs_Support__con Contact objectfalsetotrue(prevents duplicate Case creation)Acceptance Criteria
Needs_Support__cchanges totrue(not on other Contact updates)Testing Notes
Automated Testing:
ContactSupportTriggerTest.createsCaseWhenFlagFlipsTrue(): Verifies single Case creation and duplicate preventionContactSupportTriggerTest.bulkUpdateCreatesCasesOnceEach(): Validates bulk processing (5 Contacts → 5 Cases)Manual CLI Verification:
alex@cognition.sandboxorg successfullytrue→ Created exactly 1 Case with correct Subject and Contact linkageImportant Notes:
Contact_Needs_Supportgrants field access but needs assignment to appropriate users in production orgsChecklist
What issues does this PR fix or reference?
Implements Contact-triggered Case creation automation as requested in Devin session: https://app.devin.ai/sessions/d96eedaca0804048a71aa1af98ccc6c7
Requested by: Alex Peng (@alexpeng-cognition)
Review Focus Areas
Contact_Needs_Supportpermission set deployment strategy for productionfalse→truecondition