VMS Staging Submittal Flow: After Create Update
- Go to .
- Select Start From Scratch.
- Select Record-Triggered Flow and click Create.
- Select the following values:
- Object: VMS Staging Submittal
- Configure Trigger: A Record is created or updated
- Optimize the flow for: Actions and Related Records
- Hover over circle below Trigger and type “get”. Select Get Records.
- Enter the following values:
- Label: Existing Application Rec
- API Name: Existing_Application_Rec
- Object: Search for “Application”
- Conditions: set AND
- Field: FyreSyncApplication__c Equals {!$Record.Id}
- Sort Order: Not Sorted
- How many records to Store: Only the first record
- How to Store Record Data: Choose fields and let Salesforce do the rest
- Click the box to left of Select Elements (top left of screen) and click New Resource.
- Enter the following values:
- Resource Type: Variable
- API Name: v_NewApplicationRec
- Data Type: Record
- Object: Application V2
- Click Done.
- Click Select Elements and select New Resource.
- Enter the following values:
- Select Formula
- API Name: f_ApplicationStatus
- Data Type: Text
- Click Save.
-
Edit the underlined values in the list below (the Customer’s ATS Submittal Status values) to match the text values in the Customer’s Application Stage dropdown:
CASE({!$Record.VMSSNC__VMS_vmsStatus__c},
"waiting", "Assessment",
"declined", "",
"accepted", "Offer",
"placed", "Application",
"review", "",
"filled", "Closed",
"rejected", "",
"interviewing", "Internal Interview",
"Offer") - Paste the above into the Formula section and click Done.
- Click Select Elements and select New Resource.
- Enter the following values:
- Select Formula
- API Name: f_rejected
- Data Type: Boolean
- Click Save/Done.
-
Paste the below into Formula section and click Done. This sets Rejected to "True/False".
CopyIF({!$Record.VMSSNC__VMS_syncStatus__c}="rejected", true, false)
- Hover over circle below Trigger and type “get”, then select Get Records.
- Enter the following values:
- Label: Application Record Type
- API Name: Application_Record_Type
- Object: Search for “Record Type”
- Conditions: All Conditions Are Met (AND)
- Field: SobjectType Equals TR1__Application_V2__c
- Sort Order: Descending
- Sort By: CreatedDate
- How many records to Store: Only the first record
- How to Store Record Data: Automatically Store all fields
- Hover over the circle above Stop and type “decision”, then select Decision.
- Enter the following values:
- Label: Application Exists?
- API Name: Application_Exists
- Select the new outcome panel and configure:
- Label: Application already exists
- Outcome API Name: Application_already_exists
- Condition: All Conditions Are Met (AND)
- Resource: {!Existing_Application_Rec}
- Operator: is Null
- Value: False
- When to execute Outcome: If the condition requirements are met
- Select the bottom right of the decision and change Label to Application doesn't exist.
- Hover over the circle left of the Application already exists label, type "Assignment", and select Assignment.
- Change the following values:
- Label: ExistingApplication
- API Name: Existing_Application
- Set variable values:
- {!v_NewApplicationRec.SubmissionId__c} Equals `{!$Record.VMSSNC__VMS_submittalId__c}`
- {!v_NewApplicationRec.FyreSyncApplication__c} Equals {!$Record.Id}
- {!v_NewApplicationRec.Id} Equals {!Existing_Application_Rec.Id}
- {!v_NewApplicationRec.TR1__Stage__c} Equals {!f_ApplicationStatus}
- {!v_NewApplicationRec.TR1__Reject__c} Equals {!f_rejected}
- Hover below this assignment and type "Update", then select Update Records.
- Change the following values:
- Label: Update Application
- API Name: Update_Application
- How to Find Records to update and Set Their Values: Use the IDs and all field values from a record or record collection
- Record or Record Collection: {!v_NewApplicationRec}
- Hover over the circle left of the Application doesn’t exist label and type "Assignment", then select Assignment.
- Change the following values:
- Label: NewApplication
- API Name: New_Application
- Set variable values:
- {!v_NewApplicationRec.FyreSyncApplication__c} Equals {!$Record.Id}
- {!v_NewApplicationRec.FyreSyncReq__c} Equals {!$Record.VMSSNC__fyreReqAtsId__c}
- {!v_NewApplicationRec.TR1__Applicant__c} Equals {!$Record.VMSSNC__candidateAtsId__c}
- {!v_NewApplicationRec.TR1__Job__c} Equals {!$Record.VMSSNC__jobAtsId__c}
- {!v_NewApplicationRec.SubmissionId__c} Equals {!$Record.VMSSNC__VMS_submittalId__c}
- {!v_NewApplicationRec.TR1__Stage__c} Equals {!f_ApplicationStatus}
- {!v_NewApplicationRec.TR1__Reject__c} Equals {!f_rejected}
- Hover below this assignment and type "Update", then select Update Records.
- Change the following values:
- Label: Create Application
- API Name: Create_Application
- How to Set record field values: From a Record Variable
- How many Records to Create: One
- How to Find Records to Update and Set Their Values: {!v_NewApplicationRec}
- Click Save.
- Set the Flow Label to "VMS Staging Submittal AfterCreate Update".
- Click Activate.
Next Steps
With these new flows in place, you'll need to add and update flow fields.
Was this helpful?