1
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?

More than 1 year has passed since last update.

全世界2,800万人以上の開発者に使われているAPIプラットフォームPostmanの記事を書こう by PostmanAdvent Calendar 2023

Day 10

イベントストリームをフィルタリングする(Filter Your Event Streams)Postmanを使ったSalesforceのプロジェクトの解説*

Last updated at Posted at 2023-12-09

Postmanを使ったSalesforceのプロジェクトの解説です。プロジェクト自体が日本語でないので、少々実際の画面も添付して操作の助けになればと思います。

全世界2,800万人以上の開発者に使われているAPIプラットフォームPostmanの記事を書こう by Postman Advent Calendar 2023のシリーズ 1 の10日目として作成しています。

  • Filter Your Event Streams
    イベント ストリームをフィルタリングして関連データを受信し、イベント処理を最適化します。

Create a Custom Channel for Order Events

Quick Start: Connect Postman to Salesforceで設定した環境が必要です。

さて、まずはお決まり。何もしないで検証ボタンを押してみます。

We couldn't find the PlatformEventChannel with the name Order_Filtered_Channel__chn. Create this channel member by following the steps in this unit.

  1. Log in to your Trailhead Playground org.
  2. After you set up Postman by completing the Quick Start: Connect Postman to Salesforce project, open the Postman app, select a Workspace, and navigate to your fork of the Salesforce API collection.
  3. On the Authorization tab, scroll to the bottom and click Get New Access Token.

image.png

ここで下にスクロール

image.png

4. Click Allow.

image.png

5.In the Manage Access Tokens dialog, copy the instance URL to your clipboard.
6. Click Use Token.

image.png

7. On the Variables tab, in the _endpoint row, in the CURRENT VALUE column, paste the instance URL that you just copied, then click Save. You may need to close the documentation pane to see the Save button.

image.png

image.png

10. Select REST to expand the REST APIs.
11. Select GET Limits, then click Send.

image.png

image.png

12. In the response window, the Status field should show as Status: 200 OK. If it does not, repeat the steps to get a new token.

image.png

Make a Tooling API Call to Create a Custom Channel

  1. In your fork of the Salesforce APIs collection, expand Event Platform > Custom Channels > Platform Event, and click Create channel.
    2. Click Body and replace the body with this JSON body.

image.png

4. Verify that the response status is 201 Created.

image.png

Add the Order Event and the Filter Expression to a Channel Member

さて、まずはお決まり。何もしないで検証ボタンを押してみます。

We couldn't find the Order_Event__e platform event in your org. Follow the steps in this unit to define the platform event.

Define the Order Platform Eventを完了した直後に検証ボタンをクリックします。

We couldn't find the PlatformEventChannelMember with the name Order_Filtered_Channel_chn_Order_Event_e. Create this channel member by following the steps in this unit.

Make a Tooling API Call to Create a Channel Member

In your fork of the Salesforce APIs collection, expand Event Platform > Custom Channels > Platform Event, and click Create channel member.

image.png

Subscribe to the Channel

何もしないで検証ボタンを押してみます。

何もしてないけど、合格してしまった。

まじめにインストールしようとすると、既にあるみたい?

image.png

本当だ、すでにインストールされていた。 だから合格したのかもしれません。
image.png

Publish Order Events and Receive a Filtered Event Stream

何もしないで検証ボタンを押してみます。

これも何もしないでも合格してしまいましたねぇ。

  1. In your fork of the Salesforce APIs collection, expand Event Platform > Publish Platform Events, and click Publish multiple events.

image.png

1
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
1
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?