Step 4: Maintain Your Taxonomy Using a Plugin

Before You Start

Now that your doctors have their specialties assigned, you may not want to maintain both a Listings category and a taxonomy specialty for each healthcare professional entity. To manage this, you can download a plugin to automatically maintain parity between your doctors’ categories and taxonomy specialties.

Every time you create a new healthcare professional entity (or edit an existing one), this plugin will check the Categories and/or Related Specialties field and ensure that they match.

The plugin contains three functions which you can choose between based on your use case:

  1. Category to Specialty: every time you update a Listings category on a doctor profile, the corresponding specialty linked to that doctor will change accordingly.
  2. Specialty to Category: every time you update a taxonomy specialty on a doctor profile, the corresponding category linked to that doctor will change accordingly.
  3. Bidirectional: every time you update either a taxonomy specialty or a Listings category on a doctor profile, the corresponding category or specialty will update accordingly.
light bulb
Prerequisites
You will need to push resources to your Yext account via CLI in order to complete the following steps. If you have not already set up the CLI on your computer, you can do so by following Step 1 of this guide.

Steps to Install

  1. Navigate to Developer > Developer Console.
  2. In the top right corner, click + Add an App
  3. Name your app (something like “Maintaining Taxonomy Specialties”). Click Create App.
  4. Under the API Credentials tab, add an API Permission for the Management API > Entities endpoint. Under Permissions, select Read/Write. Click Save, and then confirm by clicking Change Permissions.
  5. On the same page, click the eye symbol to view the API Key related to your new app. Copy this API Key down, as you will use it soon.
  6. Navigate to this GitHub repository.
  7. Click the green <> Code button and then select Download ZIP.
  8. On your computer, unzip the file and save the folder.
  9. Open up your command line interface (Command Prompt for Windows, Terminal for Mac.)
  10. Type in the following command: yext init
  11. If you have connected to this Yext account via CLI before, select Use existing credential and select the account that hosts taxonomy data. Otherwise, select Create new credentials and input the business ID for the account where you downloaded the taxonomy solution.
  12. You will need to authorize your account if you haven’t used the CLI recently. A window will pop up in your browser. Click Authorize in this window.
  13. Return to the command line interface, and select Yes.
  14. Type in the following command: yext resources apply/filepath, replacing filepath with the file path where you saved your GitHub files in Step 8.
    • For example, if you saved the resources in your Documents folder, type in yext resources apply /Documents/maintainingTaxonomySpecialties-main
  15. When asked to confirm whether you’d like to add these resources to your account, select Yes.
  16. You will then be prompted to input the API Key you generated in Step 5 above. Paste it in the CLI and click Return.
  17. Close the CLI and open your Yext account.
  18. Navigate back to the app you created in Step 3, and select the Webhooks tab. Click + Add a Webhook.
  19. Under Select Webhook Type, choose Entities. Click Next.
  20. Give your webhook a name (something like “Taxonomy Updates”), and provide a description if you choose.
  21. Beneath URL, click … or invoke a function. From the dropdown, select maintainingTaxonomy, and then choose the function you’d like to implement based on the options detailed at the top of this step.
  22. In the bottom right corner, select Finish and Add.

You can now test your newly installed plugin by changing a specialty or Listings category on one of your doctor entities. Once you’ve changed the field, refresh the page and make sure that the corresponding category or specialty has been updated.

Feedback