Recent searches


No recent searches

Andrea Rochira's Avatar

Andrea Rochira

Joined May 13, 2021

·

Last activity Dec 15, 2022

Following

0

Followers

0

Total activity

19

Votes

3

Subscriptions

8

ACTIVITY OVERVIEW

Latest activity by Andrea Rochira

Andrea Rochira commented,

CommentUsers, groups, and organizations

Hi Adam,

Thank you for your feedback!

Actually, our Zendesk instance is closed to our internal users and they are all authenticated through our IdP.

In your case, any new unregistered (anonymous) user doesn't have any tag applied, therefore, there's surely no tag that can be evaluated at the time of their first ticket submission. That's why, I guess, my snippet cannot filter the ticket forms for them. I wonder, though, if that's exactly what we need to evaluate. 

You may edit the snippet to use a "no tag" condition, something like, "IF the array of the current user's tags is empty (or null), then show only specific forms" (never tested this with anonymous users, just brainstorming). OR, you might want to take a look at the Show Self API, which applies only to anonymous users, maybe you can leverage it to determine if the user visiting your HelpCenter is an anonymous one and hide your forms accordingly.

Another approach, although I don't have a way to really test this as well, could be to use the Show Self API above and then lookup for the user ID using the Show User API to really determine if the user is anonymous or not. 

I'm sorry I cannot be more helpful than that. Feel free to share your findings. 

View comment · Edited Feb 01, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

CommentTicket customization

In our environment, this feature is working great for end-users, but not for agents.  

If an agent clicks on the link of a pre-filled form, it opens the Zendesk Support dashboard and that's it. If an end-user clicks on that same link, it works as expected. 

Not sure what we are missing... any thought?

View comment · Posted Jan 22, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

Community comment Feedback - Ticketing system (Support)

I think this would be an amazing addition, particularly for Zendesk instances publicly accessible.

If the admins or other specific users could be notified when a new user account gets created (for example, following the registration), they could immediately verify the email address, assign the new user to a given organization, and so on with so many use cases. 

It would be as well great if such event could be "listened" by other automation platforms, like Okta Workflows or Microsoft Power Automate.  That way, even more stuff could be automated through via API calls. 

Please, consider to include this feature in a future release. 

 

View comment · Edited Jan 19, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

CommentUsers, groups, and organizations

It seems possible to export users in a CSV file; when requested, it is sent to your email address:

However, it doesn't seem to include all the users... in my case it's listing only 492 users out of 46633... 

 

View comment · Posted Jan 12, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

CommentUsers, groups, and organizations

Great article, although it doesn't show how to hide the same forms from the web widget. Also, I don't get why it provides a jQuery snippet since it's not natively supported in HelpCenter V2.

The feedback given by other users to this article, helped me figure out how to hide based on user tags, here is a working template in Vanilla JS, which is supported in HelpCenter V1 and V2 (you just need to replace the "TICKET_FORM_ID" and the user tags you need to target). And it takes care of the web widget as well.

In my use case, I needed to grant access to specific forms only to users from specific departments ("people" and "franchising_operations"). I left the tags in there to make it more simple to understand.

Feel free to suggest improvements to my code.

document.addEventListener("DOMContentLoaded", function() {

// uncomment if needed for debugging
// console.log(HelpCenter.user.tags);
// console.log(document.querySelector("a.nesty-input"));

// retrieve the tags associated to the logged-on user
var tags = HelpCenter.user.tags;
// check if the array of tags includes "people", meaning that it's an HR user
var isPeople = tags.includes("people");
// check if the array of tags includes "franchising_operations", meaning that it's a Franchise user
var isFranchisingOperations = tags.includes("franchising_operations");
// console.log(isFranchisingOperations);

// loop through the tags
//tags.forEach(function(tag) {
// console.log(tag);

// run this block only if the form drop-down selector is found
if(document.querySelector("a.nesty-input")){

// if user has not the "people" tag, hide the forms limited to HR
if (!isPeople){
// Remove the forms from the drop-down selector
document.querySelector('#request_issue_type_select option[value="TICKET_FORM_ID_ONE"]').remove();
document.querySelector('#request_issue_type_select option[value="TICKET_FORM_ID_TWO"]').remove();

// Remove the options from the nesty-input after it's been created.
document.querySelector('.nesty-panel').addEventListener('DOMNodeInserted', function(event) {
event.target.querySelector('li[id="TICKET_FORM_ID_ONE"]').remove();})

document.querySelector('.nesty-panel').addEventListener('DOMNodeInserted', function(event) {
event.target.querySelector('li[id="TICKET_FORM_ID_TWO"]').remove();})

}

// if user has not the "franchise" tag, hide the forms limited to Franchise
if(!isFranchisingOperations){
// Remove the forms from the drop-down selector
document.querySelector('#request_issue_type_select option[value="TICKET_FORM_ID_THREE"]').remove();
document.querySelector('#request_issue_type_select option[value="TICKET_FORM_ID_FOUR"]').remove();

// Remove the options from the nesty-input after it's been created.
document.querySelector('.nesty-panel').addEventListener('DOMNodeInserted', function(event) {
event.target.querySelector('li[id="1900000037625"]').remove();})
document.querySelector('.nesty-panel').addEventListener('DOMNodeInserted', function(event) {
event.target.querySelector('li[id="1900000039445"]').remove(); })

}

}

// WEB WIDGET settings
// empty array for API response
var data = {};

// let's prep for the the API call
// create a http request object
var request = new XMLHttpRequest();

// connect and retrieve all the form IDs
request.open('GET','https://mycompany.zendesk.com/api/v2/ticket_forms.json?active=true&end_user_visible=true');

// if the connection is succesfull, then go ahead
request.onload = function () {

// parse the JSON string returned
data = JSON.parse(request.responseText);

// print the parsed data into the console (for debugging purpose)
// console.log(data);

// call the function responsible to overwrite the default webwidget settings
setIds(data);
}

request.send();

// array to hold list of forms allowed
var forms = [];

function setIds(ids){

// console.log(ids.ticket_forms.length);

// loop though the forms
for (var i = 0; i < ids.ticket_forms.length; i++) {

// uncomment for debugging purpose if needed
// console.log("Counter i is: "+i);
// console.log("Number of forms from API: "+ids.ticket_forms.length);
// console.log("Length of forms array: "+ forms.length);
// console.log("Start loop with ticket n°: "+ids.ticket_forms[i].id);

// call the allowForm function and hold the boolean value
var allow = allowForm(tags,ids.ticket_forms[i].id);

// if the form is allowed, add it to the array
if(allow){

forms.push({id : ids.ticket_forms[i].id });

}else{

continue;
}
}

// console.log("Loop exited")
// console.log(forms);

// set new list of forms within the web widget
zE('webWidget', 'updateSettings', {
webWidget: {
contactForm: {
ticketForms: forms
}
}
});

}

function allowForm(userTags,formID){

// HR only allowed
if(formID == "TICKET_FORM_ID_ONE"){
if(tags.includes("people")){
return true;
}else{
return false;
}
}

if(formID == "TICKET_FORM_ID_TWO"){
if(tags.includes("people")){
return true;
}else{
return false;
}
}

// Franchise only allowed
if(formID == "TICKET_FORM_ID_THREE"){
if(tags.includes("franchising_operations")){
return true;
}else{
return false
}
}

if(formID == "TICKET_FORM_ID_FOUR"){
// console.log("Franchise second form")
if(tags.includes("franchising_operations")){
return true;
}else{
return false
}
}

// catch all condition for all other forms
if(typeof formID === 'number' ){
// console.log("Form for all")
return true;
}

}
});

View comment · Edited Jan 31, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

CommentTicket customization

Hi Greg Katechis

Thanks for pointing me in the right direction, but I'm still a bit confused about the next step.

Am I supposed to switch to the new Copenaghen theme (and eventually import custom code, if any, from the current one)? 

I don't see how I can maintain the current theme (theme version 1.2.0 and API v1) and not incurring into issues while trying to update the manifest.json file to use API v2. I actually tried to follow this article, "Importing and downloading your theme and manifest file", but I ended up getting 16 errors related to template files while attempting to import it back in Help Center (very likely due to the new helpers supported by API v2). So, I guess that a simple update of the current theme is not feasible for compatibility reasons with the new template files.

Two quick questions:

1) if we switch to the new Copenaghen theme, will I still find the old theme available in case I need to roll back to it?

2) if we have added the Zendesk Support widget to a company website, is there anything to update on that end too?

View comment · Edited Jan 03, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

CommentUsing themes and customizing your Help Center

Hi there, 

I downloaded our default theme (Copenaghen), made one single change to the manifest.json file to use API version 2 instead of 1 as explained here (in order to support the templating API v2 and enable the new features), but when I imported the theme back into Help Center Guide, I was presented with 16 errors found in 9 different files within the "templates" folder, how do I go on from there? (opening every single template file and remove the troubling entry?)

I'm including a screenshot below to give a better idea:

View comment · Edited Jan 02, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments


Andrea Rochira commented,

CommentTicket customization

Hi there, 

We are in much need of this feature to optimize a work flow, but I'm concerned about what some users commented on this other support article: https://support.zendesk.com/hc/en-us/articles/4408820214554-About-Guide-templating-versions 

How can we know if a migration to the "Templating API v2" will go smooth? What checks are recommended to perform in advance? Do you suggest to open a ticket with Zendesk in order to be assisted?

Thanks a lot for the feedback

View comment · Posted Jan 02, 2022 · Andrea Rochira

0

Followers

0

Votes

0

Comments