Knowledge Tags - Knowledge Sync/Custom Schema for Hours Custom Fields?

Hey Team!

My client who has Knowledge Tags is actively using a custom field called “Drive-Up Hours” to store this information in Yext. As such I have 2 questions:

  1. I saw recently Custom Schema was added to Pages. So cool! Does this also apply to Knowledge Tags?

  2. They are also trying to use embed codes to display this information on the front end of their pages, but are running into issues. The embed code they are using (below) looks right based on our developer documentation, but it doesn’t appear to be working:

<div data-yext-field="customFields.190576"></div>

190576 is the confirmed correct custom field ID and I see that the drive-up information is definitely included in the Live API results here (I know that is the answers endpoint but I didn’t think it mattered).

Is there something behind the scenes that needs to happen to make sure these embed tags are usable? I saw information that indicated hours custom fields might not be currently supported within embed codes, but I was just wondering how I can tell this moving forward and whether or not there is the possibility my client can format it themselves.

Let me know what you think!
Jessie

Hi Jessie!

Happy to help

  1. Custom schema is available in Pages and Knowledge Tags. For Knowledge Tags, simply click “customize schema.org markup” link on the Add Knowledge Tags page. From there, you can configure a template file for your schema markup.

  2. The syntax for the Knowledge Sync embed tags depends on whether you are using entity_id or location_id in the script. We recommend entity_id, as this leverages our new entity api endpoints.

In that case, the embed tag for a custom hours field with the API name c_secondaryHours will look like this:

<div data-yext-field="c_secondaryHours"> </div> which will print out a formatted list of hours for every day of the week.

You can also use:
<div data-yext-field="c_secondaryHours-monday"> </div> to display Monday hours or
<div data-yext-field="c_secondaryHours-friday"> </div> to display Friday hours

1 Like

Awesome! Thank you Gideon.