Using Web Widget (Classic) to embed customer service in your website

Return to top

71 Comments

  • Stacy Win

    Is this a defect or are there any solutions for this problem?

    We only use the web widget for client ticket submissions. A few clients are associated with multiple orgs. When they submit tickets, all of the tickets are associated with their default org. Which is not correct.

    Should end-users that belong to multiple orgs be able to select the correct organization when submitting a ticket via the web widget?

    Is there a way to force the correct org association based on the client site the web widget is used from?

     

     

    0
  • Maky

    Hi @Stacy win (there are 5 different Stacy Win!)

    You can add a custom field to your web widget with the list of the orgs that you have on your instance, then with a trigger when the request in coming you can select the correct organization you need.

    I think you don't refer to these organizations as brands on the Zendesk multi-brand instance, I think these organizations are a different way of classifying users on the same brand. It's correct?

    Regards.

    Maria

    0
  • Stacy Win

    Maky

    You picked the right Stacy Win!

    That is correct, I am not referring to the organizations as brands.

    The only problem with the solution you provided is there are over 300 organizations and only a handful have users associated with multiple orgs.

    Zendesk documentation states that if a user is associated with multiple orgs when they submit a ticket the form asks them to select the correct org. But I think that is only when the Help Center web form is being used. The web widget does not support this, which I think it should.

    We associate the web widget with specific sites on the software. Is there any way with code to ensure the org is set correctly on ticket creation based on the site the web widget is used?

    0
  • Maky

    Hi again Stacy!

    You can solve this in this way:

    1. Add tags to your web widget associated with the " specific sites on the software" For example; you have a games site therefor you use the tag "games_site":

    <!-- Start of your-web-widget Zendesk Widget script -->
        <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=xxxxxxxxxxxxx"> </script>
    <!-- End of your-web-widget Zendesk Widget script -->
    <script type="text/javascript">
      window.zESettings = {
          webWidget: {
            contactForm: {
                tags: ['games_site'],
                },                   
          }
        };
    </script>

    2. Add a webhook with this configuration:

    Endpoint url: https://yourinstance.zendesk.com/api/v2/tickets/{{ticket.id}}.json

    Request method: PUT

    Request format: JSON

    Authentication: basic

    3. In the ticket configuration trigger you can add a condition looking for the "games_site" tag and as an action call the webhook you created before (Notify active webhook) with this JSON body:

    {
    "ticket": {
    "organization_id": 123456
    }
    }

    Where the number 123456 is the id of the organization that you want to configure in the ticket. You can take it in the url of the organization. For exaple:

    https://yourinstance.zendesk.com/agent/organizations/123456/tickets

    I tried it and it works.

    I hope it can help you.

    Maky

     

     

    0
  • Maky

    Hi Stacy Win

    Did you solve your problem? 

    Regards.

    Maria

    0
  • Dwight Bussman
    Zendesk Customer Care

    heyO Dean Zhang - I recommend contacting our support team to look into this more closely. There may be some configuration specific to your account that could lead to such behavior, but they'll be able to dig in more deeply.

    0
  • Jason Coe

    We have no channels > classic > web widget available and I'm at a loss for understanding how to embed this.

    1
  • Gavin

    Our Web Widget Classic presents the user with our ticket forms if they don't get an answer to their question.

    I want the user to be logged in before web widget will let them submit their ticket via web widget.

    If that's not possible, how can I have the web widget load for logged-in users, but not load for non-logged-in users?  Or even better, take them through the login flow before they can submit their ticket?

    We already know how to make our Submit a Request button do this - logged-in users are taken directly to the web form, non-logged-in users are taken through our login flow before being taken to the web form.  We want the same thing to happen with the Web Widget.

    0
  • Mike DR
    Zendesk Customer Care
    Hi Gavin! You can use JWT for your use case: Enabling authenticated visitors in Web Widget (Classic)
    0
  • Krsna Musterer

    Hi there!

    I'm trying to implement the Classic Web Widget. It's almost working, except that when I try to submit the contact us form it shows the following in the console:

    "Access to XMLHttpRequest at 'http://{OUR SUBDOMAIN}.zendesk.com/api/v2/requests' from origin 'https://{DOMAIN WHERE I'M TRYING TO IMPLEMENT THE WIDGET}' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

    Not sure what I missed but I can't find anything here about this issue.
    Help?

    0
  • Mike DR
    Zendesk Customer Care
    HeyA Krsna!
     
    I've created a ticket for you. Will work with you there!
    0

Please sign in to leave a comment.

Powered by Zendesk