Articles in this section
Category / Section

How to Restrict Agents and Contacts from Creating Tickets in Customer Portal

Published:

You can restrict agents from creating tickets in the customer portal.

To do so, go to Admin > Customer Portal > Customization and paste the following custom CSS and JS codes.

By pasting these codes, the “Create Ticket” button in the customer portal will be hidden, and agents will not be able to navigate to the ticket creation page via URL.

Custom CSS code

.create-ticket-btn-web-view #createTicket,
.create-ticket-btn-web-view #anonymousCreateTicket,
#mobile-create-btn,
#mobile_ticket_tab,
#ticket_tab,
#contact-support-container,
#login-button,
#mobile_login_tab,
#contact-support-mobileview
{
display: none !important;
}

#header_view .show {
display: block;
}

#mobile_view_header #mobile-create-btn.show {
display: block;
}

.ticket-list-container,
.create-ticket-container {
display: none;
}

Custom JS code

window.restrictAgentTicketCreation = true;
if(location.pathname.includes('/support')) {
    window.location.replace(location.origin);
}

Pasting the custom CSS and JS codes

To learn where to paste the above custom CSS and JS codes, refer to this article.

Before customization

before.png

After customization

after.png

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied