Fireberry icon

Fireberry

Consume Fireberry API

Overview

The node integrates with the Fireberry API to perform various operations on Fireberry objects (records). Specifically, the "Create or Update" operation (upsert) allows users to either create a new record or update an existing one if it already exists based on specified key fields. This is useful in scenarios where you want to ensure data consistency without creating duplicates, such as syncing contacts, inventory items, or any entity where uniqueness must be maintained.

Practical examples:

  • Automatically add a new customer record if it doesn't exist, or update their details if they do.
  • Sync product information from another system, updating existing products or adding new ones as needed.

Properties

Name Meaning
Object Type Name or ID The Fireberry object type to operate on. Choose from a list of available object types or specify an ID via expression.
Upsert Key Fields Fields used to check if a record already exists. If a record matches these fields, it will be updated; otherwise, a new record will be created. Choose from available fields or specify IDs via expression.
Fields The fields and their values to set on the record. Each field can be specified by name or ID. For dropdown fields, you can choose to select from available dropdown values or enter a custom value.

Details for "Fields" property:

  • Field Name or ID: The specific field to set.
  • Use Dropdown Values: Boolean flag indicating whether to select from predefined dropdown options.
  • Dropdown Value Name or ID: If using dropdown values, select the appropriate option.
  • Field Value: The value to assign to the field if not using dropdown values.

Output

The node outputs JSON data representing the result of the upsert operation. This typically includes the created or updated record's details as returned by the Fireberry API. The output structure contains at least a json field with the record data.

If the operation fails for an item and "Continue On Fail" is enabled, the output for that item will contain an error message under the json.error field.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the Fireberry API.
  • Depends on Fireberry API availability and correct configuration of object types and fields within Fireberry.
  • Uses internal methods to load options dynamically for object types, fields, and dropdown values.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Specifying invalid object types or field names/IDs may result in errors or empty results.
    • Not selecting any upsert key fields will prevent the node from determining whether to create or update, causing errors.
    • Using dropdown values incorrectly (e.g., selecting a dropdown value not valid for the field) may cause validation errors.
  • Error messages:

    • "The operation \"upsert\" is not supported!": Indicates the operation parameter was set incorrectly or the code does not recognize it.
    • API errors related to invalid fields or permissions will be passed through; verify field names and user permissions in Fireberry.
    • Network or connectivity errors should be checked by verifying API endpoint accessibility.
  • Resolution tips:

    • Ensure all required properties are set correctly.
    • Use the dynamic dropdowns to select valid object types and fields.
    • Enable "Continue On Fail" during testing to isolate problematic records.
    • Check Fireberry API documentation for field constraints and required permissions.

Links and References

Discussion