Case Deflection - Event Listener Information | Yext Hitchhikers Platform

The following provides instructions on creating interactivity based on whether you’re using the built-in Yext search bar or a custom support form component.

Add Event Listener Script in Yext Code Editor

  1. Open the frontend of the experience you want to add Case Deflection functionality for.
  2. Open the headincludes.hbs file. Is there anything in it? Probably not!
  3. If there isn’t, copy the code from this file (this file is what’s in the Support Solution Templates) into your headincludes.hbs file.
  4. QA your experience to make sure it works the same. You won’t notice any differences when testing with a live preview.
  5. Commit and publish your changes once you’ve confirmed everything looks good.
  6. Now, you can set up Case Deflection with one of our partners - Salesforce, Zendesk, or others and there will be interaction between the Case form and your Answers Experience.

Custom Support Form

The Yext Case Deflection component listens for an Aura event named selfService:caseCreateFieldChange from a Contact Support form on the same page. This event should have the following parameters:

{
  eventType: <eventType>,
  modifiedField: <modifiedField>, 
  modifiedFieldType: <modifiedFieldType>,
  modifiedFieldValue: <modifiedFieldValue>
}

Case Deflection Signal

If (1) the value of the modifiedField parameter is Subject, and (2) the value of the modifiedFieldType parameter is selfService:caseSubject, then the Case Deflection component will populate the search bar with the value of the modifiedFieldValue parameter.

Case Submission Signal

If (1) the value of the eventType parameter is caseCreated, we will count this as a case submission in our call to the Yext Analytics API.

This is an update that you can add if you are hoping to add interactions between another field on a page and your Answers experience. This is a necessary step if you are looking to set up the case deflection solution on one of our partners like Zendesk or Salesforce. Note: if you created your Answers experience from a Zendesk free trial or with the Help Site Solution Template or Support Solution Template, this has been done for you.