Insert the Widget Into an Incident Detail Page

To insert the Intelligent Advisor widget into an incident detail page in Customer Portal in order to pre-seed the interview with values from the current incident:

  1. Deploy a policy model that is set up to load Incident data in addition to the logged-in Contact. (For more information, see Load Data From B2C Service.)
  2. Open the question detail file detail.php. This file can be found at dav/cp/customer/development/views/pages/account/questions.
  3. Insert the following code snippet as the first item under rn_pageContent:

    <?php 
        $incidentID = \RightNow\Utils\Url::getParameter('i_id');
    ?>
    <div>
        <rn:widget path="custom/opa/OPAWidget"
           policy_model="<name of the policy model to load>"
           init_id=#rn:php:$incidentID# />
    </div>

  4. Include in this code any additional widget parameters as necessary.
  5. Save the file.