0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Outbound Message をレコードトリガーフロー以外でも使う方法

Last updated at Posted at 2025-09-25

SalesfroceからYoomに連携するためにOutbound Message を使ったのですがフローのアクションではレコードトリガーフローでしか使えなかったですね。自動起動フローでも使いたいのでApexからコールできないかを調べています。

まずは

Yoomで受け取ったOutbound Messageを眺めてみます

"Id": "a1XBC000000AxwT2AS"はYoomに渡したい情報を格納しているカスタムオブジェクトのIdです。
他にもIdらしきものがあるので確認すると

"OrganizationId": "00D9D0000001Lixxxx"
"ActionId": "04kBC00000060oXYAQ"
"Id": "04lBC0000003y7hYAA"

Key Prefix Object Type Notes
04k ActionOutboundMessage Outbound Message Id
04l OutboundMessage Outbound Notification Id
{
  "Envelope": {
    "xmlns:soapenv": "http://schemas.xmlsoap.org/soap/envelope/",
    "xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
    "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
    "Body": {
      "notifications": {
        "xmlns": "http://soap.sforce.com/2005/09/outbound",
        "OrganizationId": "00D9D0000001Lixxxx",
        "ActionId": "04kBC00000060oXYAQ",
        "SessionId": {
          "xsi:nil": "true"
        },
        "EnterpriseUrl": "https://fukadadenki--dev3.sandbox.my.salesforce.com/services/Soap/c/64.0/00D9D0000001Lif",
        "PartnerUrl": "https://fukadadenki--dev3.sandbox.my.salesforce.com/services/Soap/u/64.0/00D9D0000001Lif",
        "Notification": {
          "Id": "04lBC0000003y7hYAA",
          "sObject": {
            "xsi:type": "sf:FormOutput__c",
            "xmlns:sf": "urn:sobject.enterprise.soap.sforce.com",
            "Id": "a1XBC000000AxwT2AS"
          }
        }
      }
    }
  }
}

検索してみるけど、対応してないうようです。

image.png

image.png

しかし、Yoom側ではこのURLでフックが掛かって、"Id": "a1XBC000000AxwT2AS"が取得できればいい。念のためにセキュリティー上は"OrganizationId": "00D9D0000001Lixxxx"の組織からのフックだけに反応すればいいので、
ActionOutboundMessageとOutboundMessageのIdはなくても機能するかもしれません。

試しに適当なIdを振ってYomm側で機能するかを確かめてみましょう。

試してみたら...

直接Postしても機能してますねぇ。

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?