Skip to main content

Hi there,

 

Our users can be a part of multiple companies. When using our app, they can switch between company workspaces (much like with Intercom, and many other services).

 

Every company has an attribute "isTrialing".

 

I'd like to send a banner to a customer when they are in the company workspace that is currently trialing.

 

I can create rules to "send banner to user when company is trialing", but this is then sent to the user no matter which company workspace they are in. This banner should only be sent to the user when they are in the workspace of the company that is currently trialing.

 

Would appreciate any advice. Thanks!

Hey @luke w​, do your workspace URLs have a common structure with certain variables? What would a typical workspace URL look like?


Yes! The workspace/company ID is in the url. For example: https://console.managexr.com/o/oT6wRarigvc4fLxdYjuK/dashboard where "oT6wRarigvc4fLxdYjuK" is the company id.

 

I was thinking I may be able to do some kind of dynamic filter based on the URL and the user's company ID, but couldn't figure that out. Keen to hear your response!


You're on the right track! In that case, you could combine URL rules like Current Page URL contains dashboard AND Current Page URL contains console.managexr.com.


Well, in this case the companyId is the only thing that changes between workspaces. For example, a user can access two dashboards https://console.managexr.com/o/COMPANY_1/dashboard & https://console.managexr.com/o/COMPANY_2/dashboard. COMPANY_1 is trialing and COMPANY_2 is not. I only want to show the banner when the user is in COMPANY_1's workspace, but I have no way to differentiate the two right now.

 

Note: in Intercom the user is part of COMPANY_1 and COMPANY_2. The custom isTrailing attribute is true for COMPANY_1 and false for COMPANY_2.


In that case, I'd combine the URL filters with the audience rule isTrialing is true.


Hello, I am also trying to achieve something like this. Can you be more specific on how to set the rules?

In the example that Luke described, how can I set the URL filter so that the message is sent only when the user is on the specific dashboard for COMPANY_1 and not COMPANY_2.

If I set “Current Page URL contains dashboard AND Current Page URL contains console.managexr.com” and “isTrialing is true” rule, isn’t the message going to be sent even if the user that is part of COMPANY_1 and COMPANY_2 visits dashboard of COMPANY_2 that has “isTrailing = false”?

How would Intercom know whether the user is currently on the profile that has the attribute “true” and not the other one?

If I understand it correctly, URL filter is based on the current page but attribute filters are based on the attribute values of user or its companies and those are the same on all pages. Intercom has no idea what company dashboard the user is currently on. It has no way to know that “oT6wRarigvc4fLxdYjuK” in URL is ID of COMPANY_1 and “xxxyyyzzz” is ID of COMPANY_2. Am I right or am I missing something?

 

The only solution for this situation that comes into my mind is sending “visited_dashboard” event with “isTrialing” value of the currently visited company as metadata every time user visits the dashboard and using “Event rule” with condition that “isTrialing = true” as the trigger (as shown here https://www.intercom.com/help/en/articles/5180516-send-repeatable-messages-based-on-events-you-track-in-intercom#h_445b8d90ae ).


Hi Miroslav, It’s Mat from the Support Engineering Team 😀

Well, not quite.

If you have Intercom Messenger installed for logged-in users on the page where you want to identify your users, the attributes are being read from the User (Contact) profile itself.
You can set your message audience rule to send your message only to the user who has given the attribute set to a specific value (i.e., only from a specific company). Look at the example below: 
 




Let me know if that was helpful.


Hi Mateusz.

Thank you for your reply.

> Well, not quite.

I do not understand whether you confirm that what Luke originally described and what I tried to achieve is or is not possible.

Let me try to rephrase the question using an example:

Let’s say there are two users - Alice and Bob.
Alice has custom attribute `company_token` with value “company-001”.
Bob has custom attribute `company_token` with value “company-002”.

I want to open Chat when Alice visits page with URL https://mywebpage.com/company-001/ but not any other URL and for Bob I want the same chat when he visits page with URL https://mywebpage.com/company-002/ but not any other URL.

I other words, I want the rule to be “Current Page URL value of `company_token` attribute”.

Is something like this possible?


Reply