After researching, it appears that the SalesForce REST API unfortunately doesn't have an equivalent allowSave option for overriding duplicates that the SOAP API has. I'm writing a Python client that interfaces with SalesForce and I want to send a request with WSDL/SOAP that allows me to save the duplicates. I've got something in Postman, but not sure what I need in the body of the request and I don't want to have to download and install a SOAP library for this workaround. I tried googling but couldn't find anything. What should the body of the request look like?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <urn:sessionId>[OAuth token here]</urn:sessionId>
    [What goes here to update an Account?]

Not sure what needs to go in <soapenv:Body> to update an Account? I want to update some fields, e.g.:



I'm sending this and it's working but still giving me a duplicate error:

        <urn:sObjects xsi:type="urn1:Account">
            <urn:Id>[Id is here]</urn:Id>
            <urn:BillingState>North Carolina</urn:BillingState>

SOAP Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                    <fields xsi:nil="true"/>
                    <message>You are creating a duplicate record. We recommend you use an existing record instead.</message>
                <id xsi:nil="true"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.