Updating records by using a LoopBackRequest node
Use a LoopBackRequest node in a message flow to update data records through a LoopBack® connector such as MongoDB, Cloudant®, or PostgreSQL.
Before you begin
About this task
The fields of the data record to be updated must appear in the input message tree as a JSON object. Fields that do not require updating do not have to appear in the tree.
If an ID is specified in the LocalEnvironment.Destination.Loopback.Request.Id environment variable, the record with that ID value is updated. If no record is found with a matching ID, an error is returned.
If an ID is not specified, but an external ID name and value are specified in the LocalEnvironment.Destination.Loopback.Request.externalIdName and LocalEnvironment.Destination.Loopback.Request.externalId environment variables, the record with that external ID is updated. In some cases, multiple records might match the same external ID. If no ID or external ID is specified, you can use a filter.where clause to specify the records to be updated. For more information about filtering, see Filtering the records retrieved through a LoopBack connector.
When records are updated, data is returned from the installed LoopBack connector, such as a count of the updated records.
You can use JSON schema as input and output for message maps in a Mapping node, see Using models with LoopBack connectors.
Procedure
Follow these steps to update a data record of a specified type (for example, an Account object):