Configuring the investment budget
Pega Next-Best-Action Advisor requires strategy logic for the Next-Best-Action Designer template for Pega Next-Best-Action Advisor to work properly. To set that logic, you must configure the investment budget and the Calculate Budget.
Creating a supporting decision for the investment budget
Start configuring the investment budget by creating the underlying supporting decision.
- Launch the Pega Customer Decision Hub portal by logging in with administrator credentials.
- In the Pega Customer Decision Hub portal, click .
- On the Supporting Decisions landing page, click Create.
- In the Create a supporting decision window, in the Name and Description fields, enter Budget.
- In the Real-time containers section, click Configure.
- In the Configure Containers dialog box, create a new
real-time container by doing the following steps:
- Click Create.
- In the Create Real-Time Container section, ensure that <your application>-Rules is selected.
- In the Name field, enter Budget.
- Click Create and open.
- In the Edit Real-Time Container window, click Save, and then click the Close icon.
- In the Configure Containers dialog box, click the Refresh icon.
- Click Add by the container that you created, and then click Apply.
- In the Configurations section, in the Alternate strategy section, click Configure.
- In the Configure Alternate Strategy dialog box, create a
new strategy by doing the following steps:
- Click Create.
- In the Create Strategy section, ensure that <your application>-Rules is selected.
- In the Name field, enter Determine investment budget.
- Click Create and open.
- In the Edit Strategy window, click Save, and then click the Close icon.
- On the Supporting Decisions landing page, click Save.
- Generate the data flow by doing the following
steps:
- Click the Determine investment budget strategy.
- On the Determine investment budget strategy page, click .
- On the Referencing rules tab, click the strategy rule, and then ensure that the rule has a data flow record.
- If the data flow is not visible, close the strategy window.
- On the supporting decision page, click Edit, and then click Save.
- Repeat steps 10.a through 10.c.
Determining the investment budget for Pega Next-Best-Action Advisor
After creating the supporting decision for the investment budget, create the strategy logic and then map it to the supporting decision.
- Launch the Pega Customer Decision Hub portal by logging in with administrator credentials.
- Click .
- In the list of results, click Budget.
- In the Configurations > Alternate strategy section, click Determine investment budget.
- In the Edit Strategy window, click Check out.
- Add an embedded sub-strategy.
- On the strategy canvas, add the shape, and then double-click the new element.
- In the Embedded strategy properties window,
provide the element details:
- In the Inputs tab, in the Iterate over field, enter Primary.Account.
- In the Access data for each entity field, enter Account.
- In the Name field, enter Accounts.
- On the Dictionary tab, select Is possible recipient.
- In the Subject ID field, enter .AccountID.
- Click Submit.
- Add a second sub-strategy embedded in the Accounts strategy.
- On the strategy canvas, inside the Accounts context area, add the shape, and then double-click the new element.
- In the Embedded strategy properties window,
provide the element details:
- In the Inputs tab, in the Iterate over field, enter Account.Subscriptions.
- In the Access data for each entity field, enter Subscription.
- In the Name field, enter Subscriptions.
- On the Dictionary tab, select Is possible recipient.
- In the Subject ID field, enter .SubscriptionID.
- Click Submit.
- On the strategy canvas, inside the Subscriptions context area, add the shape, and then double-click the new element.
- In the Set property properties window, provide the element
details:
- In the Name field, enter Cart Items Selected.
- On the Target tab, in the Target field, enter .SubscriptionID, and then, in the Source field, enter Subscription.SubscriptionID.
- In the Target field, enter .CartMembers.
- In the Source field, in the expression builder, enter @PegaMKTUtilities.GetContextValue("CartItems",.SubscriptionID, Primary.ContainerPayload.Contexts).
- Click Submit.
- On the strategy canvas, inside the Subscriptions context area, add the shape, and then double-click the new element.
- In the Set property properties window, provide the element
details:
- In the Name field, enter Calculate Budget.
- On the Scorecard tab, select the Strategy result radio button.
- In the Scorecard model field, enter CalculateBudget.
- Click Submit.
- On the strategy canvas, inside the Subscriptions context area, add the shape, and then double-click the new element.
- In the Decision data properties window, provide
details:
- In the Name field, enter Budget Params.
- On the decision data tab, select the Strategy Result radio button.
- In the Decision Data field, enter BudgetParameters.
- Click Submit.
- On the strategy canvas, inside the Subscriptions context area, add the shape, and then double-click the new element.
- In the Set property properties window, provide the element
details:
- In the Name field, enter Set Budget.
- On the Target tab, click Add item.
- In the Target field, enter .pyMaxBudget, and then, in the Source field, enter @toDecimal(.pxSegment).
- In the Target field, enter
.pyTargetBudget, and then, in the
Source field, use the Expression builder to
enter the following expression:.pyMaxBudget*BudgetParams.TargetThreshold
- In the Target field, enter
.pyMinBudget, and then, in the
Source field, use the Expression builder to
enter the following expression:.pyMaxBudget * BudgetParams.MinimumThreshold
- Click Submit.
- On the strategy canvas, arrange, and then connect the shapes in the following
order:
- Set Property (Cart Items Selected)
- Scorecard Model
- Set Property (Set Budget)
- Results
- Decision Data
- Click Save, and then click Check in.
- Close the strategy and the Supporting Decisions > Budget page.
- Verify whether the supporting decision works.For more information, see Verifying supporting decisions for Pega Next-Best-Action Advisor.
- In the NBAA portal, verify that the investment budget supporting decision works as expected by advancing your case to the Recommendations section, and then clicking Compare.
Specializing the Calculate Budget scorecard
To configure your investment budget, set the amount that you are willing to invest by editing the Determine investment budget strategy.
- Launch the Pega Customer Decision Hub portal by logging in with administrator credentials.
- In the Pega Customer Decision Hub portal portal, click .
- In the search field, enter Determine investment budget, and then click View.
- In the strategy row, click .
- On the strategy canvas, right-click the Scorecard Model shape, and then click Open Scorecard.
- Specialize the Calculate budget scorecard in your own
ruleset by clicking .For more information, see Creating a rule specialized by a class or ruleset.
- In the Edit Scorecard window, on the
Scorecard tab, allocate a score to your plan:
- Next to the Predictor expression field, click the Build an expression icon.
- In the Expression builder dialog box, replace <OfferNameHere> with MobileZebra, and then click Submit.
- In the Otherwise field, enter 50.
- Click Save, and then Check in.
For more information, see Defining predictors for scorecards. - In the header of Dev Studio, click .
- In the Negotiation section, ensure that your budget is visible.
Previous topic Tutorial: Configuring supporting decisions for Pega Next-Best-Action Advisor Next topic Configuring advertised bundles