Answers: Advanced Query Rules - Module Assessment: Add the Boost Vertical Query Rule

Hi all,

I’ve completed the Answers: Advanced Query Rules - Module Assessment, but I’m getting an error that I didn’t complete the item “Add the Boost Vertical Query Rule”, however, it’s showing correctly in the config and in staging without any errors. Can I get some help troubleshooting the issue?

Answers Config - https://sandbox.yext.com/s/2516931/answers/experiences/configuration/answers/edit
Module - Hitchhikers

Hi Holden,

I only see the following in your rules object.

"rules": [
    {
      "criteria": {
        "searchTermContains": [
          "job",
          "apply"
        ]
      },
      "actions": [
        {
          "actionType": "BOOST_ENTITIES",
          "entityIds": [
            "job-16"
          ],
          "verticalKey": "jobs"
        }
      ]
    }
  ],

You should have a total of three rules, as indicated in the challenge.

Hey Amani,

Sorry about that, not sure why it’s not showing up, here is what I was trying to submit.

“rules”:
[
{
“criteria”: {
“searchTermContains”: [
“turtlehead”
]
},
“actions”: [
{
“actionType”: “BOOST_VERTICAL_INTENT”,
“boostValue”: 10,
“verticals”: [
“faqs”
]
}
]
}
],
“rules”:
[
{
“criteria”: {
“contextContainsKey”: “$.jobProspect”
},
“actions”: [
{
“actionType”: “BOOST_ENTITIES”,
“entityIds”: [
“faq-6”
],
“verticalKey”: “faqs”
}
]
},
],
“rules”:
[
{
“criteria”: {
“searchTermContains”: [
“job”,
“apply”
]
},
“actions”: [
{
“actionType”: “BOOST_ENTITIES”,
“entityIds”: [
“job-16”
],
“verticalKey”: “jobs”
}
]
}
],

I’m still getting an error when submitting.

Hi Holden,

Instead of having several separate ‘rules’ objects, these should all be contained within one property - rules - this is why your config is not saving correctly.

The syntax should be:

"rules": [
       {
          "criteria": {...},
          "actions": [...]
       },
      {
          "criteria": {...},
          "actions": [...]
       },
      {
          "criteria": {...},
          "actions": [...]
       }
]