Symptom
When updating a Custom Table through Patch Request of Custom Table Entries API, only first match of composite key is being updated, even though multiple entries have the same composite key in the Database.
Environment
SAP SALES CLOUD CPQ
Reproducing the Issue
- Create a Custom Table
- Insert at least two entries where two column values are repeated—these columns will be used as the composite key in the PATCH request
- Send a PATCH request to PATCH <CPQ Tenant URL>/api/custom-table/v1/customTables/{tableName}/entries using the composite key in the payload
- Observe the result: Only the first matching entry is updated in the database.
Cause
Expected Behavior.
Resolution
Following is the current behavior of CPQ
- When there are duplicated records in a table and only 1 entry in the payload on the call:
-
The API should not throw an error, regardless of whether there are duplicates in the payload or in the database
-
If there are multiple records in the database for a given composite key and only one record in the payload, the API will update only the first matching record in the database
-
-
When there are two records in the payload and two matching records in the database, the API will:
-
Use the first record from the payload to update the first matching record in the database
-
Use the second record from the payload to update the second matching record in the database.
-
Keywords
Custom Table Entries, Patch, API, Update, Custom Table, CPQ , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Bug Filed
SAP Knowledge Base Article - Public