-
Notifications
You must be signed in to change notification settings - Fork 18
Webhooks
For some prisimic documents it is desirable to create automatically url rewrites within Magento. For example if you replace default cms pages with Prismic pages, the url rewrites needs to be adjusted to the primsic page like this:
This process can be automated if you setup a webhook in Prismic and select the documents you want to automate in de system configuration. The webhook is: https://your-url.com/prismicio/webhook/url and you can configure the webhook like:
In Magento you can find the settings under Store -> Configuration -> Elgentos -> PrismicIO -> Content type for automatic url rewrites
After publishing a document in Prismic it is sometimes desirable to flush the cache. Keep in mind a cache flush is slowing down the site for a bit. So it's best practice to only publish documents if you are finished and not on every change. In magento you can select the documents for a cache flush.
The webhook is: https://your-url.com/prismicio/webhook/cache and you can configure the webhook like: