Example: Create a visibility rule to track the order history
In this example, create a visibility rule that uses your order history as the parameter used in the rule. A user would need to sign in to the site to view a summary of their order history and know the tracking number.
- Click...
Applications | Personalization | Business Rules | Personalization Navigator | New | Rule | Rule Type | Visibility Rule
In this example, a parameter is set in an application and read in a Visibility rule. We can also use an Update rule to set the parameter for a Visibility rule to reference.
- The numbered screen capture, along with the corresponding table, provides the values and selections used in this example.
Use these example values and selections to guide you in creating a profiler rule that uses the device class attribute.
![]()
Numbered item in screen capture Description 1 Type Show Order Tracking as the name for the rule. 2 By Located in, use the default folder to store your rule for this example. 3 For Rule Type, select Visibility Rule. 4 Continue to use Show in this example to show a page or portlet based on the conditions we define in this rule. 5 Click attribute > Shared Data > Order Number.
- Order Number must exist as a parameter to select this option.
- If Order Number does not exist, click attribute > Shared Data > Manage Properties to create this parameter.
- We must know the name of the parameter that the portlet or preprocessor is using to set the value for parameters in Manage Properties.
6 In this example, continue to use is as the comparison operator. 7 In this example, Order Tracking is the parameter that is read by portlets on the site during the session and is used to display targeted content. Click value * to enter 248761 as the value for the condition. Click Submit. In this example, 248761 is your order number for a recent purchase. 8 In this example, we are not setting up another condition.
- Click Save.
You successfully created the visibility rule. We can add the rule to a page or portlet from the Manage Pages area of the site.
Visibility rules do not hide pages or portlets for anonymous users.
- To open the Manage Pages portlet, click the Administration menu icon. Then, click Portal User Interface > Manage Pages.
- Click Content Root.
- Go to the page to use the rule. For example, we might have a page that is named Orders in the Home area of the site. To locate the Orders page, click Home > Orders
- After you locate the Travel page, follow the instructions for adding the rule to a page or for adding your rule to a specific portlet.
Option Description Instructions for adding the rule to a page
- Click Edit Page Properties.
- Expand Advanced options.
- Click the arrow by Show or Hide page rule, and click Select Rule.
- Select the check box by a rule to add to the page. Click OK.
- Click Done
Instructions for adding the rule to a portlet
- Click Edit Page Layout.
- Make sure that Show portlet rule mapping is enabled. When this option is enabled, we see a Hide Portlet Rule Mappings link.
- Click the arrow by No rule mapped for a portlet on this page, and click Select Rule.
- Select the check box by a rule to add to the portlet. Click OK.
- Click Done.
Parent topic: Shared Data application object