Start a conversation

Fixing Sales Order / Google Ad Manager (GAM) Failures Showing “Unknown Error - Contact your System Administrator”

Contents

Overview

A Sales Order can fail during Google Ad Manager (GAM) processing (for example, an avails check or submit) with the UI error "Unknown Error - Contact your System Administrator". In the documented scenario, Salesforce debug logs showed the underlying failure was a CloudSense managed-code exception during incoming message processing: System.ListException: Duplicate id in list: <record_id>.

This occurred because the same Fulfilment contained duplicate csdf__Fulfilment_Item__c records for a single Product_Configuration__c (expected rule: exactly one Fulfilment Item per Product Configuration within a Fulfilment). Removing the duplicates and retrying the operation resolves the trigger failure and allows processing to proceed.

Solution

Symptoms

  • Sales Order fails during GAM processing (e.g., avails check or submit) with: "Unknown Error - Contact your System Administrator".
  • Fulfilment Items may show no obvious incoming/outgoing message errors for the order, and a correlation ID may not be available in the UI.

How to Recognize the Duplicate Fulfilment Item Root Cause

In Salesforce debug logs for the failing transaction (often during incoming message processing), look for:

  • System.ListException: Duplicate id in list: <record_id>
  • A stack trace referencing CloudSense fulfilment item processing, such as:
    • Class.CS_FulfilmentItemDelegate.updateAttributesFromFulfilmentItem
    • Class.CS_FulfilmentItemDelegate.finish
    • Class.CS_TriggerHandler.execute
    • Trigger.CS_FulfilmentItemTrigger

This typically indicates a data integrity issue where duplicate records cause list de-duplication/aggregation logic to fail in Apex.

Investigation Approach

  1. Confirm scope
    • Verify whether the issue is isolated to a single Sales Order/Fulfilment versus widespread across orders.
    • Identify the specific step that triggers the error (Sales Order Submit, GAM avails check, or Refresh from Ad Server).
  2. Capture Salesforce debug logs for the failing operation
    • Enable a Salesforce trace flag for the integration user used by the GAM/digital fulfilment processes.
    • Reproduce the failure by performing the same action that triggers "Unknown Error - Contact your System Administrator".
    • Filter logs to transactions containing FATAL_ERROR entries tied to the fulfilment item triggers/handlers.
  3. Identify the managed-code exception
    • If you find System.ListException: Duplicate id in list, proceed to the resolution steps below to remove duplicates.

Resolution: Remove Duplicate Fulfilment Items for the Same Product Configuration

Step 1 — Identify duplicates under the affected Fulfilment

Run a query like the following (placeholders shown):

select Id, Product_Configuration__c, CreatedDate, csdf__Fulfilment_Item_Link__c
from csdf__Fulfilment_Item__c
where csdf__Fulfilment__c = '<fulfilment_id>'
order by Product_Configuration__c

Review results and locate any cases where the same Product_Configuration__c appears more than once. The expected state is:

  • Exactly 1 csdf__Fulfilment_Item__c per Product_Configuration__c within a single csdf__Fulfilment__c.

Step 2 — Clean up the duplicate records

  • Delete (or otherwise remediate per your governance process) the duplicate csdf__Fulfilment_Item__c records so only one remains per Product Configuration.
  • If you need auditability, export the duplicates first (for example: Id, CreatedDate, and related references) before deletion.

Step 3 — Retry the original operation

  • Re-run the exact action that produced the error (Sales Order submit / GAM avails check / GAM sync action).
  • If CPU timeouts are also occurring, retry on a single Fulfilment Item first to reduce risk during remediation.

Note: This scenario is resolved by data cleanup (data integrity correction) and performance mitigation where needed; no package version change is required to clear the duplicate-ID trigger failure.


Validation Checklist

After cleanup and retry, confirm the following:

  • The Sales Order/GAM action completes without "Unknown Error - Contact your System Administrator".
  • Salesforce debug logs no longer show System.ListException: Duplicate id in list.

Frequently Asked Questions

1. How do I know if my "Unknown Error - Contact your System Administrator" is caused by duplicate Fulfilment Items?
Check Salesforce debug logs for the failing transaction. If you see System.ListException: Duplicate id in list: <record_id> with a stack trace referencing CS_FulfilmentItemDelegate / CS_FulfilmentItemTrigger, then duplicate csdf__Fulfilment_Item__c records for the same Product_Configuration__c under the same Fulfilment are a likely cause.
2. What is the expected data rule for Fulfilment Items and Product Configurations?
Within a single csdf__Fulfilment__c, there should be exactly one csdf__Fulfilment_Item__c per Product_Configuration__c. Duplicates can cause managed Apex processing to fail and surface as a generic “Unknown Error”.
3. After deleting duplicates, what should I verify to confirm the fix worked?
Retry the original Sales Order/GAM action and confirm:
  • No "Unknown Error - Contact your System Administrator" appears.
  • Debug logs do not show System.ListException: Duplicate id in list.
  • Related message processing completes successfully and does not fail with errors such as "Request must contain one and only one AdServer!".
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Matej Storga

  2. Posted

Comments