Skip to main content
close Search
Close search

Challenge

Circumstancing rules on multiple variables

4 Tasks

30 mins

Visible to all users
Beginner Pega Platform 8.2 English

Scenario

As 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.

The following table provides the credentials you need to complete the exercise.

Role Operator ID Password
Senior System Architect SSA@TGB rules

Your assignment

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
You can also customize the circumstancing conditions for your own countries, using the relevant tax documents.

To complete this exercise, you must perform the following tasks.

  1. Create a circumstance template using the country code and contractor properties
  2. Create a circumstance definition for each of the scenarios
  3. Circumstance the Welcome email for each set of conditions and reference the appropriate tax document in each circumstanced version

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Create a circumstance template

  1. In Dev Studio, from the Application Explorer, right-click the Onboarding case type and select Create > Technical > Circumstance Template.
  2. Create the circumstance template with the following information.

    Property Value
    Label ContractorStatusAndCountry
    Apply to TGB-HRApps-Work-Onboarding
  3. Add the following properties.
    1. .Employee.Contractor

    2. .Employee.pyCountryCode

  4. Click Save to update your circumstance template.

2 Create circumstance definitions

  1. From the Application Explorer, right-click the Onboarding case type and select Create > Technical > Circumstance Definition.

  2. Create the circumstance definition with the following information.

    Property Value
    Label USContractor
    Template Name ContractorStatusAndCountry
    Apply to TGB-HRApps-Work-Onboarding
  3. Set the Contractor value to true and the Country by Code to "USA".

  4. Click Save to update the circumstance definition.
  5. Create another 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"

  6. 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 the Welcome email

  1. Open the Onboarding case type.
  2. Select the Send Welcome Packet step to determine the correspondence used to send the Welcome email.
  3. Click the crosshairs icon to open the WelcomeEmail correspondence template.

    In the pop-up, select the old WelcomeEmail rule based on the update time.
  4. Click Save as > Specialize by circumstance to create a circumstanced version of the record.

  5. In the Template field, enter ContractorStatusAndCountry.

  6. In the Definition field, enter or select USEmployee.

  7. Click Create and open to open the Correspondence rule form and edit the text for the welcome email.
  8. Update the text of the email to add W-4 to the list of things to bring.

  9. Click Save to update the correspondence.
  10. Repeat steps 4-9 to specialize the WelcomeEmail correspondence template twice more by using the USContractor and GBEmployee circumstance definitions. In the USContractor circumstance, specify that the contractor should bring a 1099 form. In the GBEmployee circumstance, specify that the employee should bring a P45 form.

4 Confirm your work

  1. Create a new Onboarding case.
  2. Complete the required fields in the Collect Employee Info step. For this case, select Contractor and enter USA for the country code.

    Create additional cases to test the employee/USA and employee/GBR conditions.
  3. Complete the Identify Home Office and Select Orientation Plan steps.

    You can specify any values to complete the steps. They do not impact this exercise.
  4. Open the attached email and verify that the content matches the circumstanced version of the rule.

If you are having problems with your training, contact Pega Academy technical support.

Did you find this content helpful?

75% found this content useful

Want to help us improve this content?

Suggest an edit

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice