Add Knowledge Advanced SmartAssistant
You must edit the ask a question (ask.php) page to add the Knowledge Advanced version of SmartAssistant. Users can submit a questions to a support agent using the Ask a Question page. Users can also see knowledge articles as well as community discussions that match the user-entered text before submitting the question.
You can edit the ask a question page in your existing instance by copying code from the reference implementation ask a question page.
Edit the file:
cp/customer/development/views/pages/ask.phpReplace standard SmartAssistant with Knowledge Advanced SmartAssistant by changing this code:
<rn:condition content_viewed="2" searches_done="1"> <rn:condition_else/> <rn:widget path="input/SmartAssistantDialog" label_prompt="#rn:msg:OFFICIAL_SSS_MIGHT_L_IMMEDIATELY_MSG#"/> </rn:condition>
to:
<rn:widget path="okcs/OkcsSmartAssistant" view_type="explorer"/>
Remove this code:
[/concept/conbody/ol/licodeblock/i {"fa fa-thumbs-up"}) (i]
From this section:
<div class="translucent"> <strong>#rn:msg:TIPS_LBL#:</strong> <ul> <li>[/concept/conbody/ol/licodeblock/i {"fa fa-thumbs-up"}) (i]#rn:msg:INCLUDE_AS_MANY_DETAILS_AS_POSSIBLE_LBL#</li> </ul> </div> <br> <p>#rn:msg:NEED_A_QUICKER_RESPONSE_LBL# <a href="/app/social/ask#rn:session#">#rn:msg:ASK_OUR_COMMUNITY_LBL#</a></p>
Here’s an example of the reference implementation ask a question
(ask.php) page:
<rn:meta title="#rn:msg:ASK_QUESTION_HDG#" template="okcs_standard.php" clickstream="incident_create"/>
<div class="rn_Container">
<div id="rn_PageTitle" class="rn_AskQuestion">
<h1>#rn:msg:SUBMIT_QUESTION_OUR_SUPPORT_TEAM_CMD#</h1>
</div>
</div>
<div id="rn_PageContent" class="rn_AskQuestion rn_Container">
<div class="rn_Padding">
<form id="rn_QuestionSubmit" method="post" action="/ci/ajaxRequest/sendForm">
<div id="rn_ErrorLocation">/div>
<rn:condition logged_in="false">
<rn:widget path="input/FormInput" name="Contact.Emails.PRIMARY.Address" required="true" initial_focus="true" label_input="#rn:msg:EMAIL_ADDR_LBL#"/>
<rn:widget path="input/FormInput" name="Incident.Subject" required="true" label_input="#rn:msg:SUBJECT_LBL#"/>
</rn:condition>
<rn:condition logged_in="true">
<rn:widget path="input/FormInput" name="Incident.Subject" required="true" initial_focus="true" label_input="#rn:msg:SUBJECT_LBL#"/>
</rn:condition>
<rn:widget path="input/FormInput" name="Incident.Threads" required="true" label_input="#rn:msg:QUESTION_LBL#"/>
<rn:widget path="input/FileAttachmentUpload"/>
<rn:widget path="input/ProductCategoryInput" name="Incident.Product"/>
<rn:widget path="input/ProductCategoryInput" name="Incident.Category" data_type="Category"/>
<rn:widget path="input/FormSubmit" label_button="#rn:msg:CONTINUE_ELLIPSIS_CMD#" on_success_url="/app/ask_confirm" error_location="rn_ErrorLocation"/>
<rn:widget path="okcs/OkcsSmartAssistant" view_type="explorer"/>
</form>
</div>
</div>