Help Scout Beacon - Identify logged-in client in PHTML templates

8530Cloud

New Member
Hi ClientExec Team,

I’m integrating Help Scout Beacon into our ClientExec customer portal.
The Beacon itself loads correctly, but I’m looking for the recommended way to automatically identify the currently logged-in customer.

For example:
JavaScript:
Beacon('identify', {
    name: 'Customer Name',
    email: '[email protected]',
    customer_id: '12345'
});

While working on our theme, I found that the customer object is available in usermenu.phtml:

PHP:
$this->customer->getFirstName()
$this->customer->getLastName()

However, I couldn’t find the correct method to retrieve:
  • Customer email
  • Customer ID
  • Other customer attributes
My questions are:
  1. Is there an official method such as getEmail() or another recommended method?
  2. Is there documentation for the $this->customer object and its available methods?
  3. What is the recommended way to expose the logged-in customer’s information inside client area PHTML templates?
The goal is to integrate Help Scout Beacon without scraping HTML fields, but by using the official ClientExec objects.

Any guidance would be greatly appreciated.

PS: I also tried retrieving the customer’s email from the profile form, but I’d prefer not to rely on HTML fields or DOM parsing. I’m looking for the official ClientExec object or method that exposes the logged-in customer’s email and ID directly inside PHTML templates.

Thank you!
 
Hi there,

You should be able to use:

PHP:
$this->customer->getEmail()
$this->customer->getId()

Which other "customer attributes" would you be looking for?
 
Thank you for your help!
I can confirm that using:
PHP:
$this->customer->getEmail()
$this->customer->getId()

I moved the Help Scout Beacon integration into the ClientExec template, and the logged-in customer is now automatically identified with the correct name, email address and customer ID.

Everything is working correctly now.

I also have a couple of feature requests for the future.

First, it would be great to see official integrations with customer support platforms such as Help Scout, Zendesk, or Intercom. Many companies already use these platforms while continuing to rely on ClientExec for billing, automation and client management. A native integration would simplify deployment and reduce the need for custom template modifications.

Second, I think it would be valuable to expand authentication options with modern Single Sign-On (SSO) providers. Support for standards such as OpenID Connect (OIDC) and SAML, together with providers like Auth0, Microsoft Entra ID (Azure AD), Google, GitHub, or Okta, would make it much easier for organizations that already use these identity platforms across their infrastructure. This would allow ClientExec to fit more naturally into existing authentication ecosystems.

Thanks again for the quick support.
 
Back
Top