Setting the custom property in a real-time container response
After you add the new property to the Strategy Result class, ensure that it is returned as part of the Container service JSON response.
The Container service response structure can return two types
of results: RankedResults, that is, the actual strategy results,
and Actions, that is, the category or type of results. An example
of an Action result is Make sales offer.
- In Dev Studio, create a property under the appropriate class.
- Save the ExtendedContainerProperties Data Transform rule into your
implementation ruleset.In the Apply to field, select the top-level SR class or the corresponding Issue or Group class.
- On the Definition tab of the new
ExtendedContainerProperties rule, map the property that you created
in the Int-PegaCDH-Container-Offer class to a property in your
top-level SR class.
- Right-click row 2, and then click Enable.
- Right-click row 2.2, and then click Add child, as shown in the following figure:
- In the new row, in the Action column, select Set.
- In the Target column, enter the property that you created in the Int-PegaCDH-Container-Offer class, for example, AccountType.
- In the Source column, enter the property that you created in your top-level SR class, for example, AccountType.
- Click Save.
- To extend the Action results that the container returns, do the following steps:
- In Dev Studio, create a property under the Int-PegaCDH-Container-Action class.
- On the Definition tab of the new ExtendedContainerProperties rule, right-click on row 2.1, and then click Add child.
- In the new row, in the Action column, select Set.
- In the Target column, enter the property that you created in the Int-PegaCDH-Container-Action class.
- In the Source column, enter the property that you created in your top-level SR class.
- If you previously associated the real-time container with any level of Next-Best-Action
hierarchy, do the following steps to ensure that the configuration is updated:
- In App Studio, click .
- Click Edit.
- In the Triggers section, remove the real-time container association by clicking Configure, and then Remove.
- Click Apply.
- Click Save.
- In the Triggers section, restore the real-time container association by clicking Configure, and then Add.
- Click Apply.
- Click Save.
Previous topic Extending the Interaction History table for the CaptureResponse service Next topic Returning properties of an alternate SR class in a real-time container response