EAVFW

Work with the EAVFW Environment

Overview

The node named "EAVFW" is designed to interact with the EAVFW Environment, specifically allowing users to upsert records in a specified table. The "Upsert Record" operation enables users to either update an existing record if it matches certain search criteria or create a new record if no match is found. This functionality is useful in scenarios where data synchronization or conditional updates are required, such as maintaining customer records, inventory items, or any entity stored in a table within the EAVFW system.

Practical examples include:

  • Updating a user profile if the user exists based on an email address, or creating a new profile if not.
  • Synchronizing product information by searching for a product SKU and updating its details or adding it if missing.

Properties

Name Meaning
Table The target table in which to create or update a record. Users select from available tables dynamically loaded via getTables.
Search Builder Method to define how to search for existing records: either using a "Field Builder" (custom field-value pairs) or an "OData" filter string.
Search Criteria When using "Field Builder" search, this defines one or more field-value pairs to locate existing records. Each criterion specifies a field name (loaded dynamically based on the selected table) and a value to match.
OData Filter When using "OData" search, this is a raw OData filter string used to find matching records.
Input Type Defines how to input the data for the upsert operation: either through a "Field Builder" interface or by providing a raw JSON payload.
Fields When using "Field Builder" input type, this is a collection of fields and their values to set on the record. Field names are dynamically loaded based on the selected table.
JSON Payload When using "JSON" input type, this is the raw JSON object representing the record data to send. Field names should correspond to logical names defined in the manifest for the selected table.

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 EAVFW environment API. The output structure reflects the fields of the record after the operation.

If binary data were involved, it would be summarized here, but based on the provided code and properties, the node deals only with JSON data.

Dependencies

  • Requires an OAuth2 API credential configured in n8n to authenticate with the EAVFW environment.
  • Depends on dynamic loading methods (getTables, getFields) to populate options for tables and fields.
  • Uses OData filtering syntax if the OData search builder option is chosen.

Troubleshooting

  • Common Issues:

    • Incorrect or missing OAuth2 credentials will cause authentication failures.
    • Using invalid field names or values that do not conform to the table schema may result in errors from the API.
    • Malformed OData filters can lead to query errors; ensure correct syntax.
    • Providing JSON payloads with incorrect field names or types may cause the upsert to fail.
  • Error Messages:

    • Authentication errors indicate issues with the API key or token setup.
    • Validation errors from the API often point to incorrect field names or data types.
    • No records found when searching might mean the search criteria are too restrictive or incorrect.

To resolve these, verify credentials, double-check field names against the table schema, and validate OData filter syntax.

Links and References

  • OData Filter Syntax Reference
  • Documentation for the EAVFW environment API (not provided here, but recommended to consult for field names and data formats).

Discussion