0
0

Account Engagementからフローを介してチャターに投稿する

Posted at

Account Engagementフォームがはいるとリードへ連携する。
Chatterアクションでは

「Only internal users can set visibility to InternalUsers」エラーで止まってしまった。
 (Account Engagementの連携更新は外部扱いなんでしょうかね?)

> 「Only internal users can set visibility to InternalUsers」エラーで止まってしまった。

このエラーのように現状ではAccount Engagementからのポストはできないみたいです。アイデアに上がっています。

Pardot - Post To Chatter Automation/Completion Activity
https://ideas.salesforce.com/s/idea/a0B8W00000GdoByUAJ/pardot-post-to-chatter-automationcompletion-activity

もう少し調べてみるとヒントが述べられていますが... 具体的な方法が分からないですね。

Platform Events to the Rescue

Platform Events are essentially like records whose sole purpose is to trigger other things. There is plenty of developer documentation if you want to learn more about them, but for our purposes, the key thing to realize is that Apex Triggers on Platform Events will run as the Automated Process User, NOT as the user who created the event.

This means that a Platform Event triggering a chatter post will post as the Automated Process User, which does not have the same technical limitations as the B2BMA Integration User.

https://pedallucid.com/thoughts/chatter-notifications-for-pardot-with-platform-events

さらに読み進めてみると、フローでChatterにポストするのではなくて、プラットフォームイベントを発火させて、Apexトリガーで受け取ってChatterにポストするのかもしれません。

フローは実行しているユーザのコンテキストは変えることができないのですが、Apexトリガーならシステムモードで動いているので、上記の制限を回避できるようなことが述べられていると思います。

Solution Design

This architecture was designed to be as admin-friendly as possible, and require the bare minimum Apex to build and maintain. We have limited the scope of Apex to the one thing it needs to do: change the user context in which automation runs. Although Flows can be triggered by Platform Events, they do not change the context of the running user! The first iteration simply used Flow to create a Platform Event, and another Flow to listen for it—this will not suffice. It’s unclear whether this difference was an intentional decision made by Salesforce or not, but it’s key to this whole operation.
:

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