How to add a Verification badge next to an agents name
Hey all,
Ive been looking around online and I still cant find the answer to this question. I am trying to build a support channel for my clothing brand. I would ideally like to place a Verified badge (just like Twitter / Instagram) next to the agent's name, so the customer knows the support agent helping them has been verified by the brand.
I came across this article, although the code did not work for my support channel.
If anyone could please help me, I would really appreciate it!
Thanks guys!
-
Hey Nicholas,
I can give you hand if you like.
Can you send me the link to your Help Center?
Cheers,
Cedric
-
Oh awesome! My help desk URL is https://shopnicholasmauro.zendesk.com
-
Cool, give me a few minutes. I will write a little tutorial for you. Or do you have a Sandbox I can work in?
-
I dont have a Sandbox
-
Please replace the JS code with the following:
$(document).ready(function() {
var moderators = ["Username 1", "Username 2", "Adam Pepper", "Another Person"];
var supportManagers = ["Nicholas Mauro", "Christian Colding", "Jesper Petersson"];$('.comment-author').each(function(index) {
if ($.inArray($(this).find(':nth-child(2)').find(':nth-child(1)').attr("title"), supportManagers) > -1) {
$(this).addClass('support-manager');
}
else if ($.inArray($(this).find(':nth-child(2)').find(':nth-child(1)').attr("title"), moderators) > -1) {
$(this).addClass('moderator');
}});
if ($.inArray($('.post-author').find(':nth-child(2)').find(':nth-child(1)').attr("title"), moderators) > -1) {
$('.post-author').addClass('moderator');
} else if ($.inArray($('.post-author').find(':nth-child(2)').find(':nth-child(1)').attr("title"), supportManagers) > -1) {
$('.post-author').addClass('support-manager');
}});
Let me know when you replaced it and published your HC again. I will then review it there and make adjustments. If it works, I will comment the code for you.
-
Hey Nicholas,
I reviewed this question again and I think there is a better solution,
I just wrote a blog-post about it here:
http://www.cedricfjacob.com/viewpost.php?post=zendesk-help-center-how-to-add-badges-to-your-agents
Cheers,
Cedric
-
Thank you so much for all of your help! I'll try this tonight and let you know! 😃
-
Cool, please let me know if I can help with the code or if it worked for you. I would love to try my new solution with another Help Center.
Cheers,
C
-
Unfortunately, this isn't working for me.
Any chance someone can help me out with this?
Thanks!Brian
-
I was able to get it to work in the end, but we had to use a different code.
The one you guys provided, unfortunately, didn't work for me.
It'd be great to see if there's an easier way.
-Brian
-
Hey Brian!
I'm so glad you got it figured out! Feel free to share the code you used in our Tips & Tricks section; you'll even get swag as a thank you!
-
Hey Jessie!
Thanks for getting back to me. I've added it here:
https://support.zendesk.com/hc/en-us/community/posts/360000552248-Adding-agent-badge-in-Communities
Brian
Please sign in to leave a comment.
12 Comments