Configure force refresh for recommendations

  • Release version: Australia
  • Updated March 12, 2026
  • 2 minutes to read
  • Configure the Trigger Recommendation Refresh data broker to refresh and update the recommendations based on the results from UI events for precise recommendations. Similarly, use the ForceRefreshRecommendations method for configuring an explicit refresh mechanism.

    Before you begin

    Role required: sn_nb_action.next_best_action_author, or admin

    About this task

    Prior to the Zurich family release, the recommendations often remain outdated due to refresh triggers being tied only to updates on primary context records. Starting with the Zurich family release, you can configure explicit and event-driven refreshes for various context updates beyond just the primary context table to improve recommendations relevance.

    • Explicit refresh mechanism: Enables you to trigger recommendation refreshes manually, independent of internal context changes, addressing scenarios where event-driven updates are insufficient.

      Call the ForceRefreshRecommendations method. The ForceRefreshRecommendations method is shipped with the base system as part of the NextBestActionServiceImpl script include.

      ForceRefreshRecommendations method:
      sn_nb_action.NextBestActionService().forceRefreshRecommendations(input.ruleContextSysIds, input.currentRecordSysId, input.refreshAllUsers);
    • Event-driven refresh: Implements automatic recommendations updates triggered by predefined system events such as attribute changes on related tables or user interactions like button clicks or tab navigation.

      Configure the Trigger Recommendation Refresh data broker of a UI component in the UI builder. This data broker is shipped with the base system and is available for all the UI components of the record pages. Perform the following steps to configure this data broker.

    Procedure

    1. Navigate to All > Now Experience Framework > UI builder.
    2. In the UI builder, open the Workspace experience which you want update.
    3. Open the record page containing the UI component for which you want to configure the data broker.
    4. In the content tree, select a UI component.
      A panel opens on the right with Configure, Style and Events tabs.
    5. In the Events tab, select Execute Data Resource - Trigger Recommendation Refresh 1.
    6. On the Configure modal, set the following properties.
      Table 1. Configure modal
      Property Description
      Rule Context SysIds Sysid of the rule context records that must be applied to the UI component. The recommendations of these rules are reflected in the recommendations tab when the event is triggered.

      This property is of String array type.

      Current Record SysId Sysid of the record to which you want to associate the UI event.

      This property is of String type.

      Refresh All Users Refreshes recommendations for all the active agent, when set to true. By default, the value is set to false.

      This property is of Boolean type.

    7. Optional: In the When to trigger drop-down, select one of the following.
      OptionDescription
      Always Triggers the refresh every time there’s an update.
      Conditional Triggers the refresh when the defined condition is met.

      Define the condition in the Event Handler condition field.

    8. Select Apply in the Configure modal.

    Result

    When the configured component is triggered, the recommendations are refreshed and updated accordingly in the CSM/FSM Configurable Workspace.