An update action changes an existing item or record in your target application. For example, if a contact in your CRM application completes a form to indicate that their email address, mailing address, or telephone number has changed, you can update the record to keep the contact details up to date.

When you add an update action to a flow, you must first indicate which item or record you want to update by specifying its ID as a text value or by mapping to a field from a previous node.

Sample fields for an update action

Depending on the application, you might also need to indicate where the item is stored by selecting a value from a drop-down list, which is populated by the application that you’re connected to. For example, if you want to update a comment in a Jira Service Desk issue, you need to select the issue that contains the comment, and then specify the ID of the comment to be updated.

You can also enable conditional filtering to refine the search condition. This enables you to apply an only-if precondition that evaluates to either true or false, and which determines whether the record with the specified ID is updated. For more information about using conditional filtering, see Retrieve action.

Enable conditional filtering for an update action

After specifying a value for the filter condition, indicate what should happen if App Connect finds no item to update:

  • Continue processing any remaining nodes in the flow, but issue a response code of ‘204: No content’.
  • Choose to exit the flow at that point and issue a ‘404’ error.

Finally, complete the fields that you want to update in the target application. Leave a field blank if you don’t want to update its value. The values that you specify will overwrite existing values in the target app.

You can also decide what action to take based on the status code that you get in response to the update action. For example, you can use an “If” node to perform different actions for different status codes. The status codes that are returned for an update action are:

  • 200: A record that matched the filter condition was updated
  • 204: No record was found for the filter condition

You can map to the status code that an update action returns by expanding the Response info node in the list of available inputs. The following example shows how you can map to a status code that’s returned for a Salesforce “Update contact” action. (The value can be set to 200 or 204 as required.)

Selecting the status code for an update action

Join The Discussion

Your email address will not be published. Required fields are marked *