Loading
Salesforce에서 이메일을 보내기 위해서는 도메인 인증이 필요합니다.더 많이 읽기

How to update or insert (Upsert) with Salesforce Marketing Cloud connector

게시 일자: Mar 2, 2024
과업

GOAL

You have a list of objects to save in Salesforce Marketing Cloud. Some objects currently exist in SFMC and others are new. You need the firsts to be updated and the rest to be created.

The Upsert operation is throwing the error `SaveAction: UpdateAdd violation` 
단계
Upsert doesn't apply because it won't update the record. Upsert operation is used to create an object only if it doesn't exist, or delete an existing object on the ExactTarget web server. This operation is achieved by using "Create" method of the ExactTarget SOAP API. (http://mulesoft.github.io/mule-salesforce-marketing-cloud-connector/1.1.0/functional/user-manual.html)

The correct approach here is to use the Update operation with updateOptions where the payload will be a list of API Objects:
  <dw:transform-message>
    <dw:set-variable variableName="UpdateOptions"><![CDATA[%dw 1.0
      %output application/java
      ---
      {
        saveoptions : {
          saveoption: [{ PropertyName: "*",SaveAction:"UPDATE_ADD" }]
      }
      }
    ]]>
    </dw:set-variable>
  </dw:transform-message>
  <sfdc-marketing-cloud:update config-ref="Salesforce_Marketing_Cloud__OAuth_Configuration" objectType="MyAPIObjectType" updateOptions-ref="#[flowVars.UpdateOptions]"/>

 
Knowledge 기사 번호

001114941

 
로드 중
Salesforce Help | Article