Ability to add PreSave hooks on Imports
We have some imports that we want to post against in bulk. So for example instead of updating stock 1 call per item, we do 1 call for 100 items, as an array.
This works ok, but only if the API responds with an array of the exact size of the batch-request. A lot of APIs don't respond with this, but for example respond with an object, or an array containing only the errors and not all lines. Celigo then gives a 'count_mismatch' error 'Processing of submitResponse did not return same record count as the current batch size.'
It would be great if we can set a preSave hook on the imports, so that I can format non-standard API responses into a submitResponse-array that Celigo can process.
(The postSubmit response hook is triggered after the submitResponse array is processed so we cant use this hook)
-
To clarify, the hooks/steps would be:
- Premap-hook
- Celigo does JSON/XML mapping
- Postmap-hook
- Celigo sends request to external werbservice/api and gets response
- Presave-hook > responsedata array size can change
- Celigo processes the responsedata array into pages of data
- PostSubmit hook > responsedata array size cannot change
- Celigo does transforms,mappings and other remaining stuff
2
Please sign in to leave a comment.
Comments
1 comment