Aktivierung der zweiseitigen Synchronisation bei 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 „Gefällt mir“

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 „Gefällt mir“

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 „Gefällt mir“

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

Hallo! Ich habe alles eingerichtet, aber es funktioniert nur von Discourse zu Zendesk. Ich weiß nicht, was ich übersehe, damit meine Antworten in Zendesk in Discourse veröffentlicht werden können.

Hallo, ich bin mit Marla hier ^^^. Wir haben das Plugin zum Laufen gebracht! :tada:

Aber wir fragen uns: Gibt es eine Möglichkeit, die Zwei-Wege-Synchronisierung fortzusetzen, wenn/falls das Thema in eine private Nachricht verschoben wird? Manchmal fragen unsere Mitglieder nach Passwort-Resets und wir möchten die Unterhaltung innerhalb der Community fortsetzen.

Ich habe den obigen Prozess ausprobiert und er funktioniert einwandfrei! :partying_face: Es gibt jedoch ein Problem, wenn ein Kommentar in Zendesk einen Anhang enthält – die Nachricht kommt durch, aber der Anhang fehlt. Ich bin mir nicht sicher, ob im Webhook ein zusätzlicher Parameter übergeben werden muss, um Anhänge zu verarbeiten. Könnte jemand bitte klären, ob dafür spezifische Parameter erforderlich sind?

Vielen Dank!

Ich habe gerade das Zendesk-Plugin eingerichtet und es funktioniert hervorragend. Ich möchte die Zwei-Wege-Synchronisierung für Kommentare aktivieren, aber ich möchte niemals automatisch ein Zendesk-Ticket generieren.

Es sieht so aus, als ob das Synchronisieren von Kommentaren von ZD->Discourse die automatische Generierung erfordert. Ist das der Fall, oder gibt es eine Problemumgehung?

Ich habe das Zendesk-Plugin aktiviert und das Posten von Tickets an Zendesk funktioniert. Aber der Webhook in der obigen Dokumentation (https:///zendesk-plugin/sync) gibt einen 404 zurück, wenn ich ihn von der Zendesk-Webhook-Einrichtungsseite teste. Folglich kann ich keine Forenbeiträge von Zendesk aktualisieren. Was mache ich falsch?

Ein weiteres Problem: Wenn ich das Ticket in Zendesk schließe und jemand auf den Discourse-Beitrag antwortet, wird das geschlossene Ticket nicht wieder geöffnet und ich verpasse den neuen Beitrag. Irgendwelche Hinweise?

Hallo Oliver,

Ich bin sicher, das haben Sie bereits bemerkt, aber die Sync-URL muss Ihre Domain enthalten. Anstatt also nur https:///zendesk-plugin/sync könnte es so etwas wie https://forum.yoursite.com/zendesk-plugin/sync sein.

Auch nachdem Sie das Ticket auf „Gelöst“ gesetzt haben, sollten Sie jede Discourse-Antwort im ZD-Ticket sehen. Sie müssen nur nach dem Ticket suchen. :slight_smile:

Zum Beispiel habe ich auf meiner Testseite einen Beitrag erstellt und daraus ein Ticket in ZD. Ich habe das Ticket als „Gelöst“ markiert und dann eine Antwort auf das Thema in Discourse gepostet. Ich habe einen Kommentar im ZD-Ticket erhalten: