Skip to main content

Circumstancing Rules on multiple variables

Archived

3 Tasks

30 mins

Visible to: All users
Intermediate Pega Platform 8.6 Dev/Designer Studio English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in 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 rules
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

    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 as seen in the following image.
      Circumstance Template
    4. Save your changes 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.


    Available in the following mission:

    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