Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Configuring custom business logic-based routing

Updated on May 11, 2022

To process cases quicker, ensure that assignments are routed to the most appropriate workers by using custom APIs for business logic-based routing. You can choose from default APIs or add custom APIs to meet your unique business needs. You can also override APIs to modify lists of available operators and work queues, so that the lists contain only relevant workers.

For example, in a field service application you create an assignment with business logic that routes the service request to the operator whose postal code matches the location of the customer who raised the request. At run time, the system compares customer's postal code with the conditions configured in the business logic. The system then routes the assignment to the operator whose postal code meets the condition.
You configure the business logic-based routing APIs by completing the following tasks:

Adding custom routing options in business logic-based routing

Process cases quicker by creating custom routing options for assignments. To ensure that assignments are routed to the most appropriate worker, edit the parameters of your custom options.

In the business logic-based routing, you can use the following default custom options to route assignments:

  • Route based on availability and skill set
  • Route based on availability, skill set, and work load

In a dialog box, you can enter values for the parameters that are needed for the selected option.

To meet your specific business needs, create your own custom options by overriding the pyGetRoutingAPIs data transform:

  1. In the navigation pane of Dev Studio, click Records.
  2. Expand the Data Model category, and then click Data Transform.
  3. On the Instances of Data Transform tab, open the pyGetRoutingAPIs data transform.
  4. On the Definition tab, set the pyStandardValue parameter as equal to the name of your API.
  5. Set the pyPromptValue parameter as equal to the label of your API.
  6. Configure the return of the API by setting the pyAPIReturnType parameter:
    • To route the assignment to a worker, enter "OPERATOR".
    • To route the assignment to a work queue, enter "WORKQUEUE".
  7. Click Save as.
  8. Click Create and open.
  9. Optional: Customize the source of properties that are mapped with parameters:
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the Technical category, and then click Activity.
    3. On the Instances of Activity tab, open pySetRuleKeys.
    4. Set the Param.RuleClass parameter as equal to the class that you want to use as the source for the parameters of your custom API.
    5. Click Save as.
    6. Click Create and open.
  10. Optional: Include custom UI elements in the Parameters section:
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the User Interface category, and then click Section.
    3. On the Instances of Section tab, open pyRuleParamsUIExtension of a class Data-MO-Activity-Router.
    4. Customize the section to meet your specific needs.
    5. Click Save as.
    6. Click Create and open.

Modifying lists of operators and work queues for business logic-based routing assignments

Modify the list of operators and the list of work queues that are available for business logic-based routing of assignments so that the lists contain only relevant workers. Modify the lists to ensure that the assignment is routed to an appropriate person or work queue.

For example, you can filter the list of operators, so that you can only select workers with specific privileges.
  1. In the navigation pane of Dev Studio, click Records.
  2. Expand the Technical category, and then click Activity.
  3. Open pyGetOperatorsOrWorkQueues.
  4. Modify the activity to meet your specific needs, for example, add a step to view the list of operators that have certain privileges:
    1. Click Add a step.
    2. Enter a label for the step.
    3. Click When, and then select Enable conditions before this action.
    4. Define when criteria. For more information, see Activity form - Completing the Steps tab - Entering preconditions.
    5. Click Submit.
  5. Click Save as.
  6. Click Create and open.
  • Previous topic Assigning users automatically at run time with business logic
  • Next topic Configuring custom routing logic for assignments

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us