-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure the Craft plugin's create/update/delete web hooks work with new plugin workflow/design (triggered by Canto) #31
Comments
Specifically where do they need to hook in? I did look over the controller code, but can you explain what we're trying to accomplish here? If an asset is deleted or added via Canto, we want to take some kind of action on our end? Since we're not planning to sync them anymore, what action should be taken here? |
So currently there are I can see the Does that help? |
So if I'm understanding you correctly... if an asset is modified in Canto (such as editing the alt text), you want it to execute a webhook that will cause any fields that use that asset to update the associated metadata? So on our end, we'd need to search through all DAM Asset Picker fields to find ones that match the Canto Asset ID, and update them with the latest data. I do have a question about this though... since it's a headless site, would you then also want to trigger a new build, or is this overkill for syncing the data with Canto? If it's overkill, another option could be that whenever an entry is saved that has a DAM Asset Picker field in it, it always fetches the latest metadata. This would lazily keep the data in the CMS in sync with the data in Canto, and while it requires an additional step, saving that Entry would presumably hook in to whatever build/deployment system you have then take care of that end of things. Thoughts? |
Per our conversation via Google Meet: The webhook endpoints may or may not be needed with the now workflow. If we move in the direction of server-side rendering with Next.js then retaining them may make sense, if we also explicitly trigger new builds upon receiving updates/deletes from Canto. Otherwise, it may make more sense to switch to a check-Canto-for-metadata-updates upon saving an entry workflow. |
Check out the controller class for context, should be much much more straightforward with the new approach.
The text was updated successfully, but these errors were encountered: