Recent searches


No recent searches

Andrew English's Avatar

Andrew English

Joined Apr 23, 2024

·

Last activity Dec 27, 2024

Following

0

Followers

0

Total activity

12

Votes

2

Subscriptions

3

ACTIVITY OVERVIEW

Latest activity by Andrew English

Andrew English commented,

Community comment Feedback - Help Center (Guide)

Hi James Peterson - Eastern Logic 

Thank you for taking the time to help me on this. I really appreciate it!

Emily Reidy  perhaps this could be added as a new workflow for customers with theme Copenhagen 4.2?  

I have tested this locally and it is working as expected for my 3 forms and their respective organisations.  Now, I'm focusing on some of the aesthetics. A user has to select a dropdown despite the fact there will only ever be 1 option for their organisation. I did see a user with a similar issue in an old post somewhere, so I will try to implement that too. 

Once again, thank you for your help James. 

View comment · Posted Dec 27, 2024 · Andrew English

0

Followers

0

Votes

0

Comments


Andrew English created a post,

Post Feedback - Help Center (Guide)

I'm aware there is an article on this issue but it is outdated for our theme version (Copenhagen 4.2.3). We have never changed our theme and this is the standard theme out of the box.

I was speaking to a Zendesk support agent on this issue who stated that the workflow I included in the link above will not work as our theme version requires React to hide the forms. 

 

What I am looking to achieve is the following; 

I have 3 ticket forms. Form A, Form C & Form F. Form A is the generic ticket form all our customers. Forms C & F are specific forms for 2 SLA customers we have. When customers log into their portal to raise tickets, we want the correct form to display based on that customer's organisation. 

It would be great if someone could help me on achieving this but I also think this should be a standard feature provided by Zendesk and I'm very surprised a feature like this does not exist as standard. 

Posted Dec 19, 2024 · Andrew English

2

Followers

4

Votes

5

Comments


Andrew English commented,

CommentUsers, groups, and organizations

I need some assistance on this. 

I have followed the example script above but it does not seem to be working for me. 

I'm not an expert with JS so some of my questions may seem a little basic. 

Where exactly are people placing the function? In my case, I've placed it at the very bottom of the script.js file. I've also added a JQuery library to the document_head.hbs as one other user highlighted in the comment section. 

to test this, I am impersonating one of the customers who belongs to one of the organisations in question. 

I have 3 ticket forms in question. I want CformID to display for Customer C and Customer C only. 

I want FformID to display for Customer F and Customer F only. 

I want defaultFormID to display for all other customers. 

Here is my script for reference. 

$(document).ready(function() {
 // Define the form IDs
 var CformID = 31565317335835; // Form ID for Customer C
 var FformID = 31564317911195; // Form ID for Customer F
 var defaultFormID = 5740642931995; // Default Form ID for all other customers
 
 // Get user organizations
 var userOrgs = window.HelpCenter.user.organizations;
 var userOrgNames = userOrgs.map(org => org.name);

 // Remove all form options initially
 $('#request_issue_type_select option').remove();

 // Display forms based on organization
 if (userOrgNames.includes("Customer C")) {
   $('#request_issue_type_select').append('');
 } else if (userOrgNames.includes("Customer F")) {
   $('#request_issue_type_select').append('');
 } else {
   $('#request_issue_type_select').append('');
 }

 // Add an event listener to ensure the dropdown stays updated dynamically
 $('.nesty-panel').on('DOMNodeInserted', function(e) {
   var target = $(this).children('ul');
   target.children().remove();

   if (userOrgNames.includes("Customer C")) {
     target.append('

  • Customer C Form
  • ');
       } else if (userOrgNames.includes("Customer F")) {
         target.append('
  • Customer F Form
  • ');
       } else {
         target.append('
  • Default Form
  • ');
       }
     });
    });





     

    View comment · Posted Dec 06, 2024 · Andrew English

    0

    Followers

    0

    Votes

    0

    Comments


    Andrew English created a post,

    Post Q&A - Tickets and email

    I have a trigger set up that will send an email via a target to a slack channel when a specific tag is added to the ticket. The premise of this trigger is to notify account managers when their customers ask for a new feature. The integration is working as expected and updating the slack channel but I am having some difficulty with the inclusion of internal (private) notes. 


    The trigger includes placeholders such as ticket id, org name and the ticket url. But I also want it to include an internal note left by one of our support agents that briefly outlines the customer feature request, so that our account managers can see exactly what the request is without reading through the whole ticket.

     

    As far as I can tell, there is no internal comment placeholder so I tried to use some liquid markup to fix this but I've had no luck.  Any suggestions or amendments welcome. 
     

    {{ticket.follower_names}},
    
    
    Ticket {{ticket.id}} from {{ticket.organization.name}} has a feature request. 
    
    
    The details of the feature request are as follows:
    
    {% for comment in ticket.comments %}
    
      {% if comment.is_public == false %}
      
        {{ comment.value}}
       
       
      {% endif %}
    {% endfor %}
    
    
    View the ticket here:
    
    https://{{ticket.url}}

    Posted May 16, 2024 · Andrew English

    1

    Follower

    3

    Votes

    1

    Comment


    Andrew English commented,

    Community comment Developer - Zendesk APIs

    Hi Ned, 

    Thanks for the response. Your amendment has helped me. 

    I've also added pagination. 

    View comment · Posted Apr 24, 2024 · Andrew English

    0

    Followers

    0

    Votes

    0

    Comments


    Andrew English commented,

    Community comment Developer - Zendesk APIs

    After playing around with this further, I may have spotted the issue. 

    if ticket['group_id'] == 6177821616923:
                    return ticket_id

     

    import requests
    from datetime import datetime
    
    # Constants
    AUTH = 'andrew.english@coinmetrics.io/token', ''
    HEADERS = {"Content-Type": "application/json"}
    
    
    def cse_tickets(ticket_id):
    
        url = f"https://coinmetricshelp.zendesk.com/api/v2/tickets/"
    
        response = requests.get(url, auth=AUTH, headers=HEADERS)
    
        if response.status_code == 200:
            data = response.json()
            tickets = data.get('tickets')
    
            for ticket in tickets:
    
                if ticket['group_id'] == 6177821616923:
                    return ticket_id
                else:
                    return None
                    
                    
                    
    
    

     

    However, I encountered another issue. I only want tickets that are part of group id 6177821616923. It is including tickets that are not part of this group. Is the logic correct?

     

    View comment · Posted Apr 23, 2024 · Andrew English

    0

    Followers

    0

    Votes

    0

    Comments


    Andrew English created a post,

    Post Developer - Zendesk APIs

    I am trying to write a script that will outputs the following:

     

    if group_id == 6177821616923

     

    output ticket_id, created_at, reply_time_in_minutes, on_hold_time_in_minutes

     

    What's happening is that each time my script outputs, it outputs the same ticket ID for each iteration. I am sure this is something small. I am trying to map these API's together based on the ticket ID. Open to suggestions on how to make this better and more efficient. 

     

    
    import requests
    
    
    # Constants
    AUTH = 'andrew.e@coinmetrics.io/token', 'my_key'
    HEADERS = {"Content-Type": "application/json"}
    
    
    def cse_tickets(ticket_id):
    
        url = "https://coinmetricshelp.zendesk.com/api/v2/tickets/"
    
        response = requests.get(url, auth=AUTH, headers=HEADERS)
    
        if response.status_code == 200:
            data = response.json()
            tickets = data.get('tickets')
    
            for ticket in tickets:
    
                if ticket['group_id'] == 6177821616923:
                    ticket_id = ticket.get('id')
                    return ticket_id
                else:
                    return None
    
    
    def first_response_time():
    
    
        url = "https://coinmetricshelp.zendesk.com/api/v2/ticket_metrics"
    
        response = requests.get(url, auth=AUTH, headers=HEADERS)
    
        if response.status_code == 200:
            data = response.json()
            tickets = data.get('ticket_metrics')
    
            for ticket in tickets:
                ticket_id = ticket.get('ticket_id')
                created_at = ticket.get('created_at')
                first_reply = ticket.get("reply_time_in_minutes")['calendar']
                on_hold = ticket.get("on_hold_time_in_minutes")['calendar']
    
                cse = cse_tickets(ticket_id)
    
                print(f"Ticket ID: {cse} Created At: {created_at} First Reply: {first_reply}")
    
    
    first_response_time()

     

    An example of the output is below:

     

    Ticket ID: 534 Created At: 2024-04-22T13:06:12Z First Reply: None
    Ticket ID: 534 Created At: 2024-04-19T13:36:18Z First Reply: 0
    Ticket ID: 534 Created At: 2024-04-19T13:12:33Z First Reply: 0
    Ticket ID: 534 Created At: 2024-04-17T13:04:42Z First Reply: 1
    Ticket ID: 534 Created At: 2024-04-17T12:27:31Z First Reply: 1197

    Posted Apr 23, 2024 · Andrew English

    0

    Followers

    2

    Votes

    3

    Comments