Search or Create allows users to combine your Searches and your Actions together into one flow. Each Search may be associated with one Action, which represents the creation of the same type of object that search is used to look up. (Practical example here)
Example use cases might include:
What a user sees:
What a developer sees:
The user's UI is built using a combination of the
label above and the related
noun from the single Search and Action.
At this point, when the user selects the checkbox to do a Find or Create, they will be given the option to fill in both the fields for the search, as well as the fields for the create.
When the Zap runs, if an element is found during the Search, it will be used. If not, a new item will be created.
Errors like a 404 will not be interpreted as a "miss" on search and will not trigger a follow up create - explicitly return
when no records are found. If your API can't do that, use scripting to return an empty list
_post_searchwon't work, you'll have to replace
This type of connection should be used in cases where the search is likely to yield one correct result, and unlikely to yield incorrect results. Good use cases include searching by keys like
phone number, or other uniquely identifying information that the user might have.
After every successful Search or Create - we'll attempt to grab a fresh record via the Resource URL.