Tickets & Conversations

DMiller62
Member

How to avoid users having to authenticate twice when submitting a support ticket?

Hello!

 

We are new to the Service platform and have a very basic question.  Right now our website users can open a support ticket on our website with our own custom form.  We want to change this to a HubSpot form.  However, if we do that, it seems that our only option it to ask the user for their email address on the form.  This is not a good user experience because they already are logged into our website and we know who they are and have all of their details in their session/cookies.  Is there some way to pass these values to the HubSpot form so it doesn't require email or name etc.?   

 

Thanks!

David 

0 Upvotes
6 Replies 6
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

How to avoid users having to authenticate twice when submitting a support ticket?

Hello @DMiller62,

 

If you are storing email in session/cookie then you can simply get the email from the session using js code on the frontend and add that email to your form on page load or on ready events.

 

Hope this will help you

Digital Marketing & Inbound Expert In Growth Hacking Technology
piersg
Key Advisor

How to avoid users having to authenticate twice when submitting a support ticket?

@DMiller62 Cool, if the email address is available on every page then you just need to run some Javascript to add it to the form.

window.addEventListener('message', event => {
  if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormReady') {
    var input = document.querySelector('input[type=email]');
    var email = // grab from wherever you're storing the address e.g. cookie or session storage
    input.value = email;
  }
});

 

DMiller62
Member

How to avoid users having to authenticate twice when submitting a support ticket?

Excellent! Let me pass this along to our tech team and try that out.
Appreciate the help!

David

0 Upvotes
piersg
Key Advisor

How to avoid users having to authenticate twice when submitting a support ticket?

Hi @DMiller62,

 

Hubspot forms require an email. However, by default all Hubspot forms will pre-populate with known data from the HubSpot CRM (this is done via the Hubspot tracking cookie). When they log in, are their details passed to Hubspot? I assume not if you're having this issue; that would probably be the best way to do this. To do that, I would suggest using the Forms API to submit a Hubspot form every time a user logs in. It could be a form with just an email field.

 

Alternatively, you mention their details are in their "session/cookies". What do you mean exactly? How is this stored? If their email is somehow stored in local/session storage or cookies when they log in, then it would be pretty simple JS to grab that and add that to your support form on either the page load or form ready events.

DMiller62
Member

How to avoid users having to authenticate twice when submitting a support ticket?

Thanks for the feedback!

When you log into our site we track your session and have access to your
email address on every page of our site. I simply want to pass this email
to Hubspot at a hidden field on the form so the user doesn't have to enter
it manually. It would be a more seamless experience for our users. Does
that make Sense

0 Upvotes
natsumimori
Community Manager
Community Manager

How to avoid users having to authenticate twice when submitting a support ticket?

Thank you for your post @DMiller62 .

I have a feeling that this require some API works🤔 This Community conversation is a bit similar.

@piersg and @tjoyce , do you have any tips to approach this?

0 Upvotes