Synchronising tickets between Zendesk instances

8 Comments

  • Matt Savage

    Hey Dominic, this is an interesting implementation.  We've got multiple instances running, too, and we're implementing some limited instances of ticket sharing.  Couple questions about your config:

    1. What was the trade-off between developing this vs. trying to use native ticket sharing between instances? Did you have any ideas that would maintain the secure separation while requiring less dev work?
    2. What kind of load does this put on your API usage?  Looks like each time this process runs it takes 5+ API calls, which can get pretty expensive a lot of tickets are shared.
    3. Did you think at all about using the new Side Conversations feature for sharing input with minimal data sharing between those teams?
    2
  • Dominic Shelton

    Hi Matt, The built in ticket sharing didn't work for us at all since all our user accounts are synced from Active Directory to both our instances, and when a ticket is shared it would create a duplicate dummy user in the receiving instance. We could have worked around this but it probably would have been harder. This also gave us more control and a better end user experience.

    The load is not so bad since each instance has its own API limit (both are enterprise plans) and there are only 2 api calls to each instance for a ticket escalation. The volume of tickets escalated (currently) is also fairly low.

    I did not know about the side conversation feature until now, but it looks like this would not allow the HR/Payroll team to own their tickets and communicate securely without other agents being able to see their conversations. We may look at adding this into the secure instance so the HR team can still communicate with the other support teams in the standard instance.

    0
  • Heather Rommel
    Community Moderator

    Dominic,
    Fantastic post! Bravo! I really appreciate the details and technical implementation notes. I'll be referencing this, I'm sure.

    How do you handle the user base? What I mean is, an update in one instance does not auto update the user in the other account. Small issue to tackle.

    Thank you for your post!!

    0
  • Dominic Shelton

    Both userbases are kept the same by a script that creates and suspends users based on information in Active Directory.

    0
  • Heather Rommel
    Community Moderator

    Brilliant!

    0
  • Kuldeep Patidar

    @here Hi Everyone, I hope you all are doing well!

    First of all, I would like to say that this is a very useful article. I really appreciate the details and how you classified them.

    I have exactly the same scenarios and I wanted to configure a integration between two different Zendesk instances.

    Based on your instructions, I have tried to run this setup and successfully completed a few steps.
    That is:

    • Ticket received to the standard instance.
    • Agent assigns the ticket to the pseudo group corresponding to the secure instance.
    • API call from the standard instance creates the same ticket (excluding the ticket form and fields) in the secure instance and deletes the ticket in the standard instance to prevent confidential info from being present.

    But there are some areas where I've been caught, and I would like to ask for your kind assistance on that.

    1. I want to synchronize the ticket fields along with the form - Is there any way to pass ticket forms & fields? FYI: I have already created the same ticket fields with their corresponding values and types in both the instances.
    2. What should I put in the 'ticket.group.id' and 'pseudo_secure_unassigned_group_id'?
    {% case ticket.group.id %}
    {% when 360020957191 %}
    {% assign group = 360020723832 %}
    {% else %}
    {% assign group = '' %}
    {% endcase %}
    {
      "ticket":
      {
        "subject": "{{ticket.title}}",
        "group_id": "{{group}}",
        "comment": {
          "body": "{{ticket.comments_formatted}}"
        },
          "requester": "{{ticket.requester.email}}",
          "tags": [
            "escalated_from_standard",
            "ticket_stub_required"
          ],
        "custom_fields": [{"id": 360047087692, "value": "{{current_user.email}}"}]
      }
    }

    Also, for the 4th point i.e. "API call from the secure instance creates a 'stub' ticket in the standard instance containing the bare minimum of info from the escalated ticket, includes the secure ticket's ID as external ID.". I did some testing in the Create stub ticket: Trigger using the API call in secure instancebut each time the HTTP extension did not succeed in creating a stub ticket in the main instance. The Trigger event appears in the ticket summary, but it looks like that the API did not work as intended.

    Below is what I sent in Target request: Create stub ticket: Trigger

    {% case ticket.group.id %}
    {% when 360020723832 %}
    {% assign group = 360020957191 %}
    {% else %}
    {% assign group = ' ' %}
    {% endcase %}
    {
      "ticket":
      {
        "subject": "{{ticket.title}}",
        "submitter": "{{ticket.requester.email}}",
        "group_id": "{{group}}",
        "ticket_form_id": 360000851372,
        "status": "hold",
        "comment":
        {
          "body": "This is a ticket stub for a ticket escalated to secure, the secure ticket ID is {{ticket.id}}\nDo not edit this ticket.",
          "public": false
        },
        "requester": "{{ticket.requester.email}}",
        "external_id": "{{ticket.id}}",
        "tags": [
          "stub_requires_sync",
          "has_secure_id",
          "escalated_to_secure"
        ]
      }
    }

    Please enlighten me if I missed any point or went inaccurate, also if you'd like to mention any important point to make this work, I'm really looking forward to hearing from you on this.

    Regards,

    Kuldeep

    0
  • frogamic

    Debugging the calls is one of the issues we faced with the above approach. Eventually we switched to using AWS Lambda to perform the integration. For your issue with creating stubs, I'm not sure if you'd get enough info from the extension log to debug it further.

    To link your ticket fields between instances you'd need to use the API to list all custom fields in both instances and create the mapping between instances. Even when they have the same name in each instance they will have unique IDs. Once you have the IDs see here for info about adding it to the API request.

    0
  • Kuldeep Patidar

    Hello frogamic,

    Thank you for having responded, I wonder if AWS will also be useful for me too, for creating stubs. Would you please share with me the context of AWS?

    Also, thank you for sharing these additional resources.

    0

Please sign in to leave a comment.

Powered by Zendesk