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]"/>

 
ナレッジ記事番号

001114941

 
読み込み中
Salesforce Help | Article