Hey, Prismic team! I'm trying to replace one of our worst legacy slices (used in ≈200 documents) with one of our newer slices, built using Slice Machine.
The legacy slice is used to present the exact same content to ≈200 pages, but the content is managed individually on each page—meaning that if someone wanted to update the content, they'd need to do so on ≈200 individual pages.
The new slice we've built out in Slice Machine uses a content relationship so that presentation is controlled through the slice but the content is managed from a single "reference document."
Is there any way for me to programmatically remove the slice from the ≈200 documents and replace it with the new slice (ideally, including the link to the reference document) so that content creators don't have to manually update each document? We already know how to programmatically find each document using the legacy slice, but we're not sure whether we can programmatically edit/update those documents (removing old slice, adding new slice).
Thanks, @kris! I was really hoping that we could avoid manual "intern" work for this. Assuming quick but careful/error-free work (three minutes per document), manually replacing a slice across 200 documents is still 1-2 days of mind-numbing work.
@Pau: If import/export functionality is recommended for migrating content into Prismic, could import/export functionality work for this use case? Assume that the slice has no unique content and all ≈200 instances would simply link to a single, shared document via a content relationship.
Understood, Pau! Thanks for confirming. It looks like your reply might've gotten clipped at the end but it's hard to be certain. At any rate, we'll move forward assuming that replacing legacy slices with Slice Machine slices will be a manual workflow, done one document at a time.