Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chat-core-zendesk: workaround to inject ticket id to bot message #60

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

yen-tt
Copy link
Collaborator

@yen-tt yen-tt commented Dec 18, 2024

This is part of a workaround in order enable the bot message to include the ticket ID when live messaging session has ended.
Zendesk does not have native support to easily access ticket ID within Sunco system and Zendesk system also cannot easily access Sunco conversation ID. So the workaround is as follow:

  • SDK will provide the conversation ID in a custom ticket field
  • Zendesk will have a trigger upon ticket creation with the agent handoff tag AND the conversation ID field is present, which will invoke a webhook to call a Sunco API to inject the ticket ID into the Sunco conversation's metadata
  • When the messaging session is closed. The bot in the switchboard API will grab the ticket in the metadata and include it in its messaging when informing user of the closed session.

This PR implements the first step of the workaround. Additionally, the closing message on CSAT message type is removed as it should be now handled by the bot webhook in the switchboard as well.

Thread context: https://yext.slack.com/archives/C01CSDL5US0/p1733870484402519

J=CLIP-1649
TEST=manual&auto

added unit tests
setup trigger and webhook in the zendesk sandbox account and spin up local test site. Verified that the created ticket for the live messaging session contains the conversation ID in the custom field

@yen-tt yen-tt requested a review from a team as a code owner December 18, 2024 20:47
@yen-tt yen-tt merged commit c4e117f into main Dec 18, 2024
8 checks passed
@yen-tt yen-tt deleted the dev/zendesk-ticket-id branch December 18, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants