Yext CLI - Publisher Specific Fields

Hey HH Community,

I am using the Yext CLI to move Production entities & fields to Dev accounts. Is there a way to exclude certain fields from the: yext resources pull command?

Along that line, is there currently a bulk way of removing these publisher specific fields from entity JSON files? The developer account does not like these publisher specific fields, despite the account feature of “Always show Facebook & Google fields” feature being turned on?

To exclude certain types of resources, you may use the --exclude flag in the CLI. For example,
yext resources pull ~/r/p-exclude --exclude km/field

Once you have pulled your files, then you can use sud (GitHub - yext/sud: Solution updater) to bulk edit your json files.

For example,
sud remove "default/km/entity/Event-*.json" --path /folder ~/r/p-exclude

Hey Aditya,

Thanks for the tips.

Sorry for the confusion, but I want to exclude certain fields from the JSON file (mainly the publisher specific fields) not the fields resource.

Is there a tool available that is friendlier for Windows computers?

Discussed this with Kevin offline and noting down the takeaways.

Some of the fields are behind paywalls via subscription features and product features. To get the fields into another production account, first, add relevant license packs to enable subscription features.

Prefer cloning into a sandbox account and pull and apply by adding dependencies. This creates subsscription and product features.

For example,

Pull with dependencies:

yext init <production-source-account-id>

yext resources pull ~/r/p-my-source-account --include-system-dependencies

Then init with sandbox destination account

yext init -u sandbox <sandbox-destination-account-id>

‘Apply’ asking to add missing dependencies:

yext resources apply ~/r/p-my-source-account --on-missing-dependencies ADD -f

To remove fields from entities, you may use sud, for example,

sud remove "*.json" --path /content/facebookParentPageId ~/r/p-my-source-account
Note that the quotes above are needed to avoid bash expansion.
Remember to include --path otherwise sud will remove the files instead.

1 Like