Shopify webhook to Filemaker fix
Fixed the issue with my Shopify webhook to the FileMaker issue.
Not sure why yesterday when i told it to only pass a single 10-15 character long ID thta it didn’t work but after playing with it after office hours this monring, i did the same thing and passed just the ID and it worked but going back to passing the full JSON payload of the shopify order JSON data, it was too much for filemaker to handle via Perform script method in DAPI.
So my fix was to use DAPI to first find the order in FM. If it found it, then it just sends the Shopify order via the DAPI perform script method; otherwise, it creates a record in the orders table and sets the order ID field and the webhookJSONData field with the payload. Then I pass the Shopify Order ID via the DAPI perform script method.
FM script goes to orders layout, finds order by ID, grabs JSON data from webhookJSONData field, and does what it needs to do.
Works great. Now I guess we know there is a limit to the amount of data that can be passed via the “script.param” parameter that the DAPI perform script method uses to pass data from PHP to FM.
@Doug Hauenstein I do plan on trying to learn the FM Odata way instead of DAPI just need to find a place to learn it from to see how it all works. Haven’t touched it. The main things I do are log in, log out, find, create, edit, and run scripts in my current files.