Batch Action
AI-generatedOverview
This node performs a batch action on a specified table in the Launix API. It sends a batch of items to a batch endpoint exposed by the API, allowing bulk operations such as updating or processing multiple records at once. This is useful for scenarios where you need to efficiently handle multiple data items in a single API call, for example, updating statuses of multiple orders or processing a batch of transactions.
Use Case Examples
- Sending an array of items identified by an ID field to a batch update endpoint.
- Sending full JSON objects of each input item as-is to a batch processing endpoint.
Properties
| Name | Meaning |
|---|---|
| Table | The table on which the batch action will be performed. This is a required field and must be selected from a searchable list of tables. |
| Batch Action | The batch endpoint exposed by the API descriptor to which the batch items will be posted. This is required and depends on the selected table. |
| Items Mode | Determines how the items are sent in the batch request. 'ID Field' mode sends an array of items with an ID field built from input items, while 'Full JSON' mode sends each input item JSON as-is. |
| ID Field | The field name on the incoming items to use as the item ID when 'ID Field' mode is selected. This is required when using 'ID Field' mode. |
Output
JSON
json- The response from the batch action API call for each item, paired with the corresponding input item index.
Dependencies
- Requires an API key credential for Launix API authentication.
Troubleshooting
- Error 'Table is missing': Ensure the 'Table' property is selected before executing the batch action.
- Error 'Batch action is missing': Ensure the 'Batch Action' property is selected and valid.
- Error 'Missing id field': When using 'ID Field' mode, verify that each input item contains the specified ID field.
- Error 'Batch action response must be an array': The API response must be an array matching the number of input items.
- Error 'Batch action response length mismatch': The length of the response array must match the number of input items.