Action Events |
Condition library
This page provides a library of action event conditions and possible use cases that have been shared and contributed by Sage People and others working in customer projects over time. Some conditions shared here use additional custom fields. Before using a condition from this page, check the fields in your org to see if you need to create a new field.
When using conditions in the library, always consider the object where the action event is triggered. Fields used in the condition must be hosted by the same object.
Before you start, consider the following points:
- Do not go cross object within the condition. If you do, the action event may not trigger or may trigger inappropriately.
- Remember the syntax checker for action event conditions only checks that the formula is written in the expected Salesforce language. The syntax checker cannot check if the correct event is triggered, so always run several test scenarios with the action events as part of the UAT.
If you need more than 1 condition for an action event, the recommended approach is to create a formula field on the object triggering the event to return a True or False statement, either as a picklist or checkbox, and use the formula field as the condition for the event.
Exit questionnaire for voluntary leavers
-
Use case: Send an exit questionnaire to a team member who is a voluntary leaver, 7 days before their employment end date
-
Additional fields used: A custom field on the employment record to identify if the team member is a voluntary or involuntary leaver, called
UDF_Type_of_Leaving__c
. In this example this field is a picklist field. -
Event and offset:
-
Employment Record: End Date
-
Offset: -7 days
Using this offset triggers the event 7 days before the team member's employment End Date.
-
-
Condition:
CopyISPICKVAL(UDF_Type_of_Leaving__c, "Voluntary")
Exit survey
-
Use case: Sends an email a specified number of days before the employment End Date with a link to an exit survey HCM form. The survey is only sent to team members with a specific employment basis.
-
Additional fields used: A custom checkbox field on the employment record,
Suppress_Email__c
, indicates if emails are sent to the team member or not. The email is only sent to team members for whom this flag is false (not checked). -
Event and offset:
-
Employment Record: End Date
-
Offset: -5 days
Using this offset triggers the event 5 days before the team member's employment End Date.
-
-
Condition:
CopyfHCM2__Basis__c = "Employee"
&&
Suppress_Email__c = FALSE
Probation end reminder
Example 1
-
Use case: Send a reminder for the approaching end of a team member's probation period, 30 days before Probation End Date.
-
Event and offset:
-
Employment Record: Probation End Date
-
Offset: -30 days
-
-
Condition:
CopyNOT(ISPICKVAL(fHCM2__Team Member__r.fHCM2.Employment_Status__c."Left"))
Example 2
-
Use case: Sends an email 30 days before a team member's Probation End Date to managers where the employee is not a leaver, whose Probation Status is not Pass or Fail, and whose employment Basis is not Officer or Contractor.
-
Additional fields used: A custom picklist field for probation status,
Probation_Status__c
. -
Event and offset:
-
Employment Record: Probation End Date
-
Offset: -30 days
-
-
Condition:
CopyNOT(ISPICKVAL(fHCM2__Team Member__r.fHCM2.Employment_Status__c.”Left”))
&&
NOT (ISPICKVAL( Probation_Status__c , "Pass") )
&&
NOT (ISPICKVAL( Probation_Status__c , "Fail") )
&&
NOT (ISPICKVAL(fHCM2__Basis__c,"Officer"))
&&
NOT (ISPICKVAL (fHCM2__Basis__c,"Contractor")))
Onboarding form email
-
Use case: Send an email with the Onboarding form when a team member employment record is created. The email is only sent to team members with specific employment basis values as detailed in the formula, and associated with a specific work location.
-
Event and related form:
-
Employment record: Start
-
HCM Form: Onboarding
-
-
Condition:
Copy(fHCM2__Basis__c = "Junior Programme Officer (JPO)"
|| fHCM2__Basis__c = "Permanent"
|| fHCM2__Basis__c = "Permanent Part Time"
|| fHCM2__Basis__c = "Temporary"
|| fHCM2__Basis__c = "Temporary Part-Time")
&& fHCM2__Work_Location__c = "Geneva"
New starter important information reminder
-
Use case: Send an email to the team member's manager and the Department Approver 2 days after Start Date if any of the fields specified in the formula are missing a value.
-
Event and offset:
-
Employment Record: Start Date
-
Offset: 2 days
-
-
Condition:
CopyISBLANK( fHCM2__Account_Name__c )
|| ISBLANK( fHCM2__Account_No__c )
|| ISBLANK( fHCM2__Bank_Name__c )
|| ISBLANK( fHCM2__Sort_Code__c )
|| ISBLANK( fHCM2__Team_Member__r.fHCM2__Gender__c )
|| ISBLANK( fHCM2__Team_Member__r.fHCM2__Birth_Date__c )
|| ISBLANK( fHCM2__Team_Member__r.fHCM2__Social_Security_Number__c )