Upsert (create or update)
Every connector makes available a set of actions. Apart from connectors, AppConnect makes several utility actions available (e.g. create pie chart, get file from URL, etc.).
Actions can be grouped into the following types:
Upsert (create or update)
The Create object action allows you to create any standard or custom object. In Insightly, creating an organization record requires at least an Organization Name to be stated.
Create action will typically return an ID that can be used to look up the newly created object. Sometimes, the entire object (with all the fields) will be returned. This depends on the API AppConnect uses to connect to the apps.
The Update Object action allows you to make changes to existing objects. The input to this action will usually be data that will uniquely identify the object to be updated.
In this example, it will use the Insightly Organization Record ID stored in Zendesk to update specific fields or update the entire object (with all the fields) of the organization record specified.
This action is used to search for an object given a set of data that help identify an object.
Search will return all objects matching the specified criteria. i.e. Search returns a list of objects.
The search results will return any record where the field value contains that searched value. For example, if a user were to search for a Contact with an email of firstname.lastname@example.org that Contact would be returned, but a Contact with email@example.com would be returned as well.
If no objects are found, search will return an empty list. i.e. Search will not throw an error. This will cause downstream actions that depend on the results of the search to fail.
Get is similar to search, but is more pinpointed - it requires a unique ID identifying the object to be passed. If the object is available, it will return the details of the object.
If the object is not found, get will throw an error.
In the case of Insightly, using the Get action on an Account will require you to input the Insightly Record ID.
Upsert is a combination of search, and create or update. Upsert will first search to see if an object exists, if object exists, it will update it otherwise it will create a new object.
Most upsert actions will perform a search for the object based on the object ID, create the object if it does not exist, or else perform an update on it with the input field values.
Delete actions allows you to delete any object. The input to this action is usually an ID that identifies the object to be deleted. However, most apps do not support delete, so AppConnect does not have broad support for deletes.
As the nature of this action can lead to permanently lost data, it is best to be cautious and understand the implications when using this action in AppConnect Recipes.