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:
- 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.)
- Open the question detail file detail.php. This file can be found at dav/cp/customer/development/views/pages/account/questions.
- 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> - Include in this code any additional widget parameters as necessary.
- Save the file.