Zendesk 양방향 동기화 활성화

요약

이 문서에서는 다음 내용을 다룹니다:

  • Discourse에서 Zendesk 동기화 설정 활성화
  • Zendesk 웹훅 구성
  • Zendesk 트리거 설정

Zendesk 동기화 설정 활성화

시작하려면 Zendesk 플러그인을 활성화하고, 동기화 설정을 켜며, 보안 토큰을 제공해야 합니다.

  1. 플러그인 설정으로 이동: Discourse 사이트로 이동하여 /admin/plugins/discourse-zendesk-plugin의 Zendesk 플러그인 설정 페이지로 이동합니다. 또는 /admin/site_settings에서 검색하여 설정을 찾을 수도 있습니다.
  2. 플러그인 활성화: 아직 활성화되지 않았다면 zendesk enabled 설정을 찾아 활성화합니다.
  3. 동기화 설정 활성화: sync comments from zendesk 설정을 찾아 활성화합니다.
  4. 웹훅 토큰 제공: zendesk incoming webhook token 필드에서 무작위 보안 문자열을 생성하고 추가합니다. 이 토큰은 나중에 Zendesk 웹훅 구성 시 사용됩니다.
  5. 자동 생성 카테고리 구성: 양방향 동기화는 Zendesk 티켓 자동 생성이 구성된 카테고리의 주제에만 작동합니다. zendesk autogenerate all categories를 활성화하거나, 특정 카테고리를 zendesk autogenerate categories 설정에 추가하십시오. 이 설정이 없으면 웹훅은 수신된 댓글을 조용히 무시합니다.

Zendesk 웹훅 설정

Zendesk에서 웹훅을 구성하려면 다음 단계를 따르세요:

  1. 웹훅 페이지에 액세스: Zendesk의 Apps and integrationsWebhooks 섹션으로 이동합니다.
    • 예시 URL: https://<instance_name>.zendesk.com/admin/apps-integrations/webhooks/webhooks
  2. 웹훅 생성:
    • 오른쪽 상단 모서리의 Actions 버튼을 클릭합니다.
    • Create Webhook을 선택합니다.
    • 웹훅 세부 정보를 입력합니다:
      • Request method: PUT
      • Endpoint URL: https://<discourse.example.com>/zendesk-plugin/sync
      • Request format: JSON


  1. 웹훅 테스트:
    • Test Webhook 버튼을 클릭합니다.
    • 드롭다운에서 'Custom Test’를 선택합니다.
    • JSON을 다음 내용으로 교체하고 토큰을 삽입합니다:
     {
         "ticket_id": "{{ticket.id}}",
         "topic_id": "{{ticket.external_id}}",
         "email": "{{current_user.email}}",
         "token": "INSERT TOKEN HERE"
     }
  • Send Test를 누릅니다. HTML 페이지가 성공을 나타내도록 표시되는 400 Bad Request 응답이 정상 신호로 예상됩니다.

Zendesk 트리거 설정

Zendesk에서 트리거를 구성하여 작업을 자동화합니다:

  1. 트리거 페이지에 액세스: Zendesk의 AdminObjects and RulesBusiness RulesTriggers 섹션으로 이동합니다.
    • 예시 URL: https://<instance_name>.zendesk.com/admin/objects-rules/rules/triggers
  2. 트리거 생성:
    • Add trigger를 클릭합니다.
    • 이름을 "Discourse Sync"로 지정하고 카테고리를 "Notifications"로 설정합니다.
    • 아래에 묘사된 대로 조건과 작업을 구성합니다.



  • 테스트 웹훅 단계에서 사용한 것과 동일한 JSON 본문을 사용하며, 다시 "INSERT TOKEN HERE"를 토큰으로 교체합니다.
  1. 트리거 저장: 구성이 완료되면 트리거를 저장했는지 확인하십시오.
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!

Hello! I set everything up but it only works from Discourse to Zendesk. I don’t know what I’m missing so that my answers in Zendesk can be published in Discourse

Hi I’m with Marla here ^^^. We got the plugin to work! :tada:

But we’re wondering: is there’s any way to continue the two way sync when/if the topic is moved to a private message? Sometimes, our members will ask for password re-sets and we’d like to continue the conversation within the community.

I have tried the above process, and it’s working fine! :partying_face: However, there’s an issue when a comment in Zendesk contains an attachment—the message is coming through, but the attachment is missing. I’m not sure if there’s an additional parameter that needs to be passed in the webhook to handle attachments. Could someone please clarify if there are any specific parameters required for this?

Thank you!

I’ve just set up the Zendesk plugin and it’s working great. I’d like to enable two-way sync for comments, but I do not want to autogenerate a Zendesk ticket… ever, really.

It looks like syncing comments from ZD->Discourse requires enabling autogeneration. Is that the case, or is there a workaround?

I’ve enable the Zendesk plugin and posting tickets to Zendesk works. But the Webhook in the documentation above (https:///zendesk-plugin/sync) returns a 404 when I test it from the Zendesk Webhook setup page. Subsequently, I can’t update forum posts from Zendesk. What am I doing wrong?

Another issue: If I close the ticket on Zendesk and someone replies to the Discourse post, the closed ticket isn’t re-opened and I miss the new post. Any hints?

Hi Oliver,

I’m sure you’ve already realized this, but the sync URL needs to include your domain. So rather than just https:///zendesk-plugin/sync it might be something like this: https://forum.yoursite.com/zendesk-plugin/sync.

Even after setting the ticket to “Solved” you should still see any Discourse reply on the ZD ticket. You’ll just have to search for the ticket. :slight_smile:

For example, on my test site I created a post and from that a ticket in ZD. I marked the ticket as “Solved” and then posted a reply to the topic on Discourse. I did get a comment on the ZD ticket: