Module Assessment | Yext Hitchhikers Platform

loading
You must include a first name and last name in your profile to create challenge environments.

Background

You love the idea of the Admin Console - it could make it significantly easier to add or make changes across different resources. In this challenge, your account has everything from the Content track – you have:

  • Restaurant entities
  • FAQ entities
  • Job entities
  • Event entities

You want to modify some resources in your account directly via Admin Console. Specifically, you want to add a new custom field and update the fields on a couple of entity types.

Your Challenge

  1. From the navigation bar, click Developer then click Admin Console. This should launch the Admin Console in a new tab.

  2. Look around at the various files. If you completed the Content track you should be very familiar with the resources you added. Open up all of the directories to see everything that’s there.

  3. Click on “Settings” and check off Friendly Name Mode and click “Save”. Note how the names for things like templates and labels are now readable.

  4. Time to make some changes! Navigate to km/field-eligibility-group/job.default.json so you can add the primary CTA custom field to the type. In the fields array, add the primary CTA field:

        "c_primaryCTA"
  5. Click the “Add Resource” button to add a new field for event disclaimer.

    • Select “Knowledge Manager”.
    • Select “field”.
    • Enter the resource name as eventDisclaimer.
    • Click “Create” — the system will add a file template for the field resource type. You’ll notice that the $id for this new field will actually show as c_eventDisclaimer. The c_ prefix denotes a custom field (as opposed to a built-in one). This follows the default resource naming pattern.
  6. Modify the new field resource with the field metadata:

    • Add this description so your field has a tool-tip: “Enter any event disclaimers here, like public health, city ordinances, capacity concerns, etc.”
    • Delete the descriptionTranslation array object (this should be multiple lines).
    • Add a displayName of “Event Disclaimer”.
    • Delete the displayNameTranslation array object (this should be multiple lines).
    • Update group to “NONE”.
    • Update localization to “PRIMARY_ONLY”.

    Make sure you have no JSON syntax errors. All strings should be enclosed in quotation marks. Just like in the Search frontend code editor or backend configuration editor, you should see red underlining and red notation if there is an error detected in the syntax.

  7. Update the field’s type. In the type object, remove everything except for the stringType object.

    • Update stereotype to “MULTILINE” to set to subtype of Multiline text.
    • Update the maxLength to 200 to add custom validation.
    • Remove the minLength.
    • Update the typeId to “string”.

    You want the field to be similar to the c_deliveryDisclaimer field you created in the UI, so you can use that as a reference point if needed.

    It should look like this:

    "type": {
      "stringType": {
        "stereotype": "MULTILINE",
        "maxLength": 200
      }
    },
    "typeId": "string"
  8. Navigate to the file for the Event entity type field eligibility group file (km/field-eligibility-group/event.default.json).

  9. Add the new c_eventDisclaimer field to the field array.

  10. Review the changes you’ve made so far by clicking the “Show Diff” button at the top. Select to “View diffs for this account” and click “Continue”. You should see one added file and two edited files — your new event disclaimer field, the event type, and the job type.

  11. Close out of the View Diff dialog and apply your changes by clicking “Apply” in the top-right. Select “Apply to this account” and click Continue. You can leave the Namespaces field empty. As in the previous step, you should see the same three files as diffs. Review these to make sure they look right according to the instructions and then click Continue.

  12. Review the confirmation dialog. When you are ready, click “Confirm”.

  13. Monitor the console for any errors or issues. If you have any errors, try to debug and retry. You can reach out to the Community if you need assistance.

  14. Return to your account and navigate to Content > Configuration > Fields. Click into the Event Disclaimer field - you can see that any changes applied through Admin Console appear in your account.

  15. On the Event Disclaimer field in the UI, click into the Field Specification and update the validation to have up to 400 characters instead of 200 and click “Save”.

  16. Return to the Admin Console. Since you just made a change in your account, you want to make sure that you have the latest data from your account. If you still have your tab up, do a hard refresh to pull in fresh configuration files (Ctrl+Shift+R on a PC or Command+Shift+R on a Mac). Otherwise, you can re-launch the Admin Console by navigating to Developer > Admin Console.

  17. Navigate to the Event Disclaimer field (km/field/eventDisclaimer.json) to see the changes you made in the UI.

Module Assessment
+<% util.points %> points
loading
Weekly Challenge Streak Weekly Challenge Streak: <% util.streakWeekly %>
You must include a first name and last name in your profile to create challenge environments.
Challenge account expires in <% util.expirationHours > 24 ? Math.round((util.expirationHours * 1.0) / 24) : util.expirationHours %> <% util.expirationHours > 24 ? (Math.round((util.expirationHours * 1.0) / 24) == 1 ? 'day' : 'days') : (util.expirationHours == 1 ? 'hour' : 'hours') %>.
Challenge account has expired. Please create a new account.
Report Card
Add the Event Disclaimer custom field via Admin Console
Add the Primary CTA field to the Job type using Admin Console
Previous Submissions
Attempt #<% submission.attemptNumber %>
<% submission.date %>
Score: <% submission.numericScore %>
Pending
Feedback