Skip to main content

Circumstancing Rules on multiple variables

3 Tasks

30 mins

Visible to: All users
Intermediate Pega Platform 8.7 Dev/Designer Studio English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

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.

 

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

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

Challenge Walkthrough

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. Configure the circumstancing template with the following information.
    Property Label
    .Employee.Contractor Contractor
    .Employee.pyCountryCode Country by Code
    Circumstance Template
  4. Save your changes to the 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".

    circumstance-multiple-variable-definition
  4. Save your changes to the circumstance definition.
  5. 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"

  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 an email

  1. Open the Onboarding case type.
  2. Select the Send Welcome Packet step to identify the correspondence used to send the Welcome email.
  3. Click the crosshairs icon to open the WelcomeEmail correspondence template.
    correspondence-template
    Tip: In the pop-up, select the old WelcomeEmail rule based on the most recent update date and 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. Create and open the Correspondence rule form to edit the welcome email text.
  8. Add W-4 to the list of documents in the correspondence text.
    circumstance-multiple-variable-add-W4-correspondence
  9. Save your changes to the correspondence rule.
  10. Repeat steps 4-9 to specialize the WelcomeEmail correspondence template twice more for the USContractor and GBEmployee circumstance definitions.
  11. 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

  1. Create a new Onboarding case.
  2. In the Collect Employee Info step complete the required fields, select Contractor and enter USA for the country code.
  3. 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.
  4. 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.
    challenge-multi-circumstance-file-documents
     
    circumstance-multi-variable-challenge-email
  5. 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.

Did you find this content helpful?

Want to help us improve this content?

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