Zendesk双方向同期の有効化

Summary

In this documentation, we will cover:

  • Enabling Zendesk synchronization settings in Discourse
  • Configuring a Zendesk webhook
  • Setting up a Zendesk trigger

Enabling Zendesk synchronization settings

To begin, you will need to enable a specific setting in Discourse and provide a secure token.

  1. Navigate to Admin Settings: Go to your Discourse site and navigate to the Admin settings page at /admin/site_settings.
  2. Enable Sync Setting: Find and enable the sync comments from zendesk setting.
  3. Provide Webhook Token: In the zendesk incoming webhook token, generate and add a random secure string. This token will be used later for configuring Zendesk’s webhook.

Setting up a Zendesk webhook

Follow these steps to configure a webhook in Zendesk:

  1. Access Webhooks Page: Navigate to the Webhooks section in Zendesk under Apps and integrationsWebhooks.
    • Example URL: https://<instance_name>.zendesk.com/admin/apps-integrations/webhooks/webhooks
  2. Create a Webhook:
    • Click the Actions button in the upper right corner.
    • Select Create Webhook.
    • Fill in the webhook details, ensuring you replace <discourse.example.com> with your Discourse site’s URL.


  1. Test the Webhook:
    • Click the Test Webhook button.
    • Select ‘Custom Test’ from the dropdown.
    • Replace the JSON with the following, inserting your token:
     {
         "ticket_id": "{{ticket.id}}",
         "topic_id": "{{ticket.external_id}}",
         "email": "{{current_user.email}}",
         "token": "INSERT TOKEN HERE"
     }
  • Hit Send Test. Expect a 400 Bad Request as a positive signal with the HTML page displayed indicating success.

Setting up a Zendesk trigger

Configure a trigger in Zendesk to automate actions:

  1. Access Triggers Page: Go to the Triggers section in Zendesk under AdminObjects and RulesBusiness RulesTriggers.
    • Example URL: https://<instance_name>.zendesk.com/admin/objects-rules/rules/triggers
  2. Create a Trigger:
    • Click Add trigger.
    • Name it “Discourse Sync” and set the category to “Notifications”.
    • Configure the conditions and actions as depicted below.



  • Use the same JSON body as in the test webhook step, again replacing “INSERT TOKEN HERE” with your token.
  1. Save the Trigger: Once configured, make sure to save the trigger.

Last edited by @jessii 2024-10-29T18:59:23Z

Check documentPerform check on document:
「いいね!」 10

Hey @techAPJ this is really awesome! Is there a way to set up a triggered sync as opposed to a live sync? i.e. an agent would add a tag in ZD or hit a button or something and only then would the ticket sync to the community?
We are trying to figure out the best way to share common FAQ tickets we get to ZD in the community with the Q&A so that users can find the answers there instead of writing in a ticket.
Thanks!

「いいね!」 3

The only triggered sync we have currently is from Discourse → Zendesk.

Triggering a manual sync from Zendesk → Discourse is tricky since we do not have complete control on Zendesk. That said, I’ll investigate if there is a way to trigger webhook from Zendesk by adding a tag, etc.

「いいね!」 3

@techAPJ did you ever look into ZD to Discourse sync? We are looking at ways to push FAQs from tickets on Zendesk to Discourse!

こんにちは。すべて設定しましたが、DiscourseからZendeskへのみ機能します。Zendeskでの回答をDiscourseに公開するために何が足りないのかわかりません。

マ ーラと一緒にいます^^^。プラグインを動作させることができました!:tada:

しかし、疑問があります:トピックがプライベートメッセージに移動された場合、双方向同期を継続する方法はありますか? 時々、メンバーがパスワードのリセットを求めてくることがあり、コミュニティ内で会話を続けたいと考えています。

上記の手順を試しましたが、正常に動作しています! :partying_face: しかし、Zendesk のコメントに添付ファイルが含まれている場合に問題が発生しています。メッセージは届いていますが、添付ファイルがありません。添付ファイルを処理するために、Webhook で追加のパラメータを渡す必要があるかどうかはわかりません。これに必要な特定のパラメータがあるかどうか、どなたか明確にしていただけますでしょうか?

ありがとうございます!

Zendeskプラグインをセットアップしたばかりで、うまく動作しています。コメントの双方向同期を有効にしたいのですが、Zendeskチケットを自動生成したくありません。本当に、絶対に自動生成したくありません。

ZD->Discourseからのコメントの同期には、自動生成の有効化が必要なようですが、これは本当ですか?それとも回避策がありますか?

Zendesk プラグインを有効にし、Zendesk へのチケット投稿は機能しています。しかし、上記のドキュメントにある Webhook (https:///zendesk-plugin/sync) は、Zendesk Webhook 設定ページからテストすると 404 を返します。その結果、Zendesk からフォーラム投稿を更新できません。何が間違っていますか?

別の問題があります。Zendeskでチケットをクローズし、Discourseの投稿に誰かが返信した場合、クローズされたチケットは再オープンされず、新しい投稿を見逃してしまいます。何かヒントはありますか?

こんにちは、オリバーさん

すでに気づいていると思いますが、同期URLにはドメインを含める必要があります。したがって、https:///zendesk-plugin/sync ではなく、次のようなものになる可能性があります。https://forum.yoursite.com/zendesk-plugin/sync

チケットを「解決済み」に設定した後でも、ZDチケットでDiscourseの返信を確認できるはずです。チケットを検索するだけです。:slight_smile:

たとえば、私のテストサイトでは、投稿を作成し、そこからZDでチケットを作成しました。チケットを「解決済み」とマークし、Discourseのトピックに返信を投稿しました。ZDチケットにコメントが表示されました。