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.

B2C Commerce Alerts for Slackを設定してみる

Last updated at Posted at 2022-04-28

※ これから記載する事項は、私が所属する会社とは一切関係のない事柄です。

この記事では、Business ManagerからSlack連携をし、アラートをSlackに飛ばすための設定を紹介します。
下記3つのヘルプを参考に設定しましたので、詳細はこちらをご覧ください。

また、Slack アプリを作成しますので、アプリについての詳細はこちらを参照してください。

手順

Slackアプリを作る

  1. アプリのページへ遷移し、Create an App を選択。作成済みの場合はそのアプリを選択 。
  2. ポップアップが出てくるので From an app manifest を選択。
  3. 任意のワークスペースを選択して、次へ。
  4. このmanifestスニペットのnameとdescription, display_nameを好きなものに編集してコピペする。
_metadata:
  major_version: 1
  minor_version: 1
display_information:
  name: <name>
  description: <description>
  background_color: "#2d9c0b"
features:
  bot_user:
    display_name: <display_name>
    always_online: false
oauth_config:
  scopes:
    bot:
      - groups:read
      - channels:read
      - chat:write
      - chat:write.public 

5.Create を選択する。

チャネルを作る

SlackのサイドバーのAdd Channels からチャネルを作成。

チャネルにアプリを招待する

作成したチャネルにアプリを招待する。 @{作成したアプリ名} でメンションするのが一番早いです。

SlackアプリのBotトークンを利用してCCのBusiness Managerに設定する

  1. ここへ行き、作成したアプリを選択する。
  2. 左ナビの OAuth & Permissions を選択する。
  3. OAuth Tokens for Your Workspace にトークンが表示されているのでそれをコピー。
  4. Business Manager の 管理 > 通知設定 > Slack タブを選択
  5. ワークスペースへの接続を追加するボタンをクリック。
  6. トークンの項目に先ほどコピーしたトークンを利用。
  7. 作成したSlackのチャネルを選択し、接続を追加する。
  8. Business Managerの 管理 > 通知設定 > 設定 タブに移動し、通知を送りたいイベントに作成したSlackチャネルを設定する。

実際にアラートを飛ばしてみる

顧客リストに紐づいたイベントに設定して、パスワードの文字数の要件を8文字以下に変更すると下記のようなアラートが飛んできました。さらに設定を戻すと修正された旨が飛んできます。

スクリーンショット 2022-04-28 18.08.21.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?