Run the Directory Manager | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How to run the directory manager
- What data the Directory Manager will add to your account
Now that you’ve created a configuration file in your account, let’s go ahead and actually run the Directory Manager. Directory Manager will use the logic defined in your configuration file to create entities and the applicable relationships between them.
Step 3: Run the Directory Manager
In your Yext account, navigate to the Pages > Directory Manager page.
In the table, you will see the configuration file we created in the previous unit. Navigate to the dropdown menu and click
Run. This operation will instruct the Directory Manager to create your entity tree based on the instructions specified in your configuration file.
Momentarily, you will notice two updates to your directory:
- Status - This indicates that the DM is actively maintaining a tree of entities in your account.
- Live Entities - This count indicates the number of entities that were generated by the DM.
Quick Content Tour
Now that the Directory Manager is active, let’s actually take a look through your Content and admire the DM’s work.
In your Yext Account, navigate to the Content > Entities tab. You will notice there are some new entities: a Root entity, State entities, and City entities. These entities were generated based on the
address fields from the location entities in your Content.
In the top-right corner of your screen, click on the saved filter Icon. You will notice that the Directory Manager created three saved filters for you: one for each level of the tree (root, state, and city). Click on “US Directory - address.city” to examine the saved filter criteria, which filters data based on the following:
- Entity Type = “City” (pulled from your DM configuration file)
- Fields with Data = “Directory Children” (entities that are related to at least one entity)
- Directory Manager ID = “US Directory” (the ID of your DM configuration file; if you have multiple trees in your account, this ensures your saved filter only includes entities from your specific tree)
Now, let’s examine the relationships. Click on the New York (city) entity. You will notice that the Directory Manager populated data for the following fields:
- Directory Parents
- This field contains the full ancestry of “parents” above this entity in the directory tree. In this case, the parent entities are New York (state) and the root entity (which is, by definition, the parent of all entities in the tree).
- Directory Children
- This field lists all entities one level below in the tree. In this case, the set of location entities that have an address in New York City.
- Directory Children Count
- The total count of children this entity is related to.
Click on one of the location entities, and look for the Directory Parents field. You will notice the list contains “Root”, “New York (state)”, and “New York (city)”.
Next, click on the root entity, and look for the Directory Children field. Notice that it lists out all the state entities. Click on “New York (state)”, and observe the parents and children fields. The Directory Manager is powerful in that it creates all necessary relationships between entities automatically for you, allowing you to easily traverse the entire tree. Keep this in mind, as we will be leveraging the power of relationships later in your frontend code.
Directory Manager Details Page
Now, let’s go back to the Directory Manager page. Navigate back to Pages > Directory Manager, and click “View” to inspect your US Directory.
This will take you to the “Directory Details” page, which displays two sections of data:
- Directory Summary - A summary of your configuration file
- Document Logs - A table of document logs, which explains the Content updates the Directory Manager made in response to each base entity. You can click into each document to inspect the set of actions. If your entity tree is ever in an unexpected state, you can return to this UI to inspect the logs to determine what may have gone wrong.
You have successfully run the Directory Manager and navigated through the changes it made in your UI. In the next unit, we will be walking through how to incorporate your entity tree to power your Pages frontend.