Input & Output

Upsert using Duplicate Check Search

The dc3DataApi endpoint enables the creation or updating of Salesforce records with built-in duplicate detection. If a duplicate is found, the existing record is updated; if no duplicate is found, a new record is created. The API also supports creating related records within the same request, ensuring data integrity and efficiency.

Authentication

The dc3DataApi endpoint requires authentication via Salesforce OAuth 2.0. Requests must include a valid OAuth access token in the Authorization header.

For detailed authentication steps, refer to: Salesforce Authentication Guide

Method Signature

POST /services/apexrest/dupcheck/dc3DataApi

Parameters

TypeVariableDescription
JSONUpsertDataInputThe structured input object containing record data.

Example Request

{
    "input": {
        "allOrNone": true,
        "duplicateCheck": true,
        "duplicateScore": 100,
        "objectType": "Lead",
        "objectData": {
            "LastName": "Doe",
            "FirstName": "John",
            "Company": "Doe Enterprise",
            "Email": "[email protected]"
        },
        "relatedList": [
            {
                "duplicateCheck": true,
                "duplicateScore": 100,
                "objectType": "CampaignMember",
                "referenceField": "LeadId",
                "objectData": {
                    "CampaignId": "7015I0000004rAwQAI"
                }
            }
        ]
    }
}

Response

The dc3DataApi endpoint returns an UpsertDataOutput , which provides details about the success or failure of the operation. The response includes information about the primary record as well as any related records processed in the request.

Example Response

{
    "isSuccess": true,
    "isCreated": true,
    "errorMessage": null,
    "objectId": "00Q5g00000B12345",
    "objectData": {
        "FirstName": "John",
        "LastName": "Doe",
        "Id": "00Q5g00000B12345"
    },
    "relatedList": [
        {
            "isSuccess": true,
            "isCreated": true,
            "errorMessage": null,
            "objectId": "7015I0000004rAwQAI",
            "objectData": {
                "CampaignId": "7015I0000004rAwQAI",
                "LeadId": "00Q5g00000B12345"
            },
            "relatedList": []
        }
    ]
}