Circumstancing Rules on multiple variables
3 Tasks
30 mins
Intermediate
Pega Platform 8.8
Dev/Designer Studio
English
Scenario
As a part of the onboarding process, TGB sends an email that provides the employment start date to each new employee and contractor. This email also reminds the employee or contractor to bring specific paperwork on their first day at TGB. Business partners in the Human Resources (HR) department want to customize the emails by country and employee status to direct the employee to bring the appropriate paperwork on their first day.
Circumstance the Welcome email on two properties: .pyCountryCode and .Contractor. You need to create three circumstanced versions of the Welcome email as outlined in the following table.
Contractor | Country Code | Documents |
---|---|---|
true | USA | 1099 |
false | USA | W4 |
false | GBR | P45 |
Note: You can also customize the circumstancing conditions for your own countries, using the relevant tax documents.
- Create a circumstance template using the country code and contractor properties
- Create a circumstance definition for each of the scenarios
- Circumstance the Welcome email for each set of conditions and reference the appropriate tax document in each circumstanced version
The following table provides the credentials you need to complete the challenge.
Role | User name | Password |
---|---|---|
Senior System Architect | SSA@TGB | pega123! |
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.
Challenge Walkthrough
Detailed Tasks
1 Create a circumstance template
- In the Pega instance for the challenge, enter the following credentials:
- In the User name field, enter SSA@TGB.
- In the Password field, enter pega123!.
- In Dev Studio, from the Application Explorer, right-click the Onboarding case type and select Create > Technical > Circumstance Template.
-
Create the circumstance template with the following information.
Property Value Label ContractorStatusAndCountry Apply to TGB-HRApps-Work-Onboarding - Configure the circumstancing template with the following information.
Property Label .Employee.Contractor Contractor .Employee.pyCountryCode Country by Code - Save your changes to the circumstance template.
2 Create circumstance definitions
-
From the Application Explorer, right-click the Onboarding case type and select Create > Technical > Circumstance Definition.
-
Create the circumstance definition with the following information.
Property Value Label USContractor Template Name ContractorStatusAndCountry Apply to TGB-HRApps-Work-Onboarding -
Set the Contractor value to true and the Country by Code to "USA".
- Save your changes to the circumstance definition.
-
Create a second circumstance definition with the following information.
Property Value Label USEmployee Template Name ContractorStatusAndCountry Apply to TGB-HRApps-Work-Onboarding
Definition Contractor = false
Country code = "USA"
-
Create a third circumstance definition with the following information.
Property Value Label GBEmployee Template Name ContractorStatusAndCountry Apply to TGB-HRApps-Work-Onboarding Definition Contractor = false
Country code = "GBR"
3 Circumstance an email
- Open the Onboarding case type.
- Select the Send Welcome Packet step to identify the correspondence used to send the Welcome email.
- Click the open icon to open the WelcomeEmail correspondence template.
Tip: In the pop-up, select the old WelcomeEmail rule based on the most recent update date and time.
- Click Save as > Specialize by circumstance to create a circumstanced version of the record.
- In the Template field, enter ContractorStatusAndCountry.
- In the Definition field, enter or select USEmployee.
- Create and open the Correspondence rule form to edit the welcome email text.
- Add W-4 to the list of documents in the correspondence text.
- Save your changes to the correspondence rule.
- Repeat steps 4-9 to specialize the WelcomeEmail correspondence template twice more for the USContractor and GBEmployee circumstance definitions.
- Modify the correspondence template text using the following information for each circumstance.
Circumstance Contractor form USContractor Specify that the employee should bring a 1099 form. GBEmployee Specify that the employee should bring a P45 form.
Confirm your work
- Create a new Onboarding case.
- In the Collect Employee Info step complete the required fields, select Contractor and enter USA for the country code.
- Advance the case to the Select Seating Location step.
Note: You can specify any values to complete the steps. The input does not impact this exercise.
- Open the attached email and verify that the content matches the circumstanced version of the rule.
Note: You may need to refresh the case to display the email attachment.
- Create additional cases to test the employee/USA and employee/GBR conditions.
This Challenge is to practice what you learned in the following Module:
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?