SAP B1 Service Layer 7 - Inventario icon

SAP B1 Service Layer 7 - Inventario

Interact with SAP B1 Service Layer 7 - Inventario

Overview

This node integrates with the SAP Business One Service Layer (version 7) to manage inventory-related resources, specifically here focusing on the Item resource's Delete operation. It allows users to delete an item from the SAP B1 inventory system by specifying its primary key.

Common scenarios where this node is beneficial include:

  • Automating cleanup of obsolete or incorrect inventory items.
  • Integrating SAP B1 inventory management into broader workflows that require conditional deletion of items.
  • Synchronizing external systems with SAP B1 by removing items no longer present or valid.

For example, a user might set up a workflow that deletes items flagged as discontinued in an external database, ensuring SAP B1 stays up-to-date without manual intervention.

Properties

Name Meaning
DocEntry / Key Primary key of the item resource to identify which item to delete.

The property "DocEntry / Key" expects a string representing the unique identifier of the item to be deleted.

Output

The node outputs JSON data representing the response from the SAP B1 Service Layer after attempting to delete the specified item. The output structure typically includes confirmation of deletion or error details if the operation failed.

If the deletion is successful, the JSON will contain the server's success response (often empty or minimal). If an error occurs, the JSON will contain an error field with the error message describing what went wrong.

No binary data output is produced by this operation.

Example output on error:

{
  "error": "Item not found or already deleted"
}

Dependencies

  • Requires connection credentials for the SAP B1 Service Layer API, including:
    • Base URL of the SAP B1 Service Layer.
    • Username and password for authentication.
    • Company database name.
  • The node performs a login request to obtain session cookies used for subsequent API calls.
  • The environment must allow HTTPS requests to the SAP B1 Service Layer endpoint.
  • No additional external libraries beyond n8n's built-in HTTP request helper are required.

Troubleshooting

  • Authentication errors: If login fails, verify the username, password, and company database values are correct and that the SAP B1 Service Layer is accessible.
  • Invalid DocEntry: If the provided primary key does not exist, the API will return an error indicating the item was not found.
  • Permission issues: Ensure the authenticated user has sufficient rights to delete items in SAP B1.
  • Network issues: Connection timeouts or SSL errors may occur if the SAP B1 endpoint is unreachable or uses self-signed certificates. The node disables strict SSL verification (rejectUnauthorized: false) but network connectivity must still be ensured.
  • Error messages: The node returns error messages from the SAP B1 API directly in the output JSON under the error key. Use these messages to diagnose issues.

Links and References

Discussion