# How to select which chatflow to load?

**URL:** <https://community.hubspot.com/t/how-to-select-which-chatflow-to-load/23436>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [July 27, 2020, 6:12pm UTC](https://community.hubspot.com/t/how-to-select-which-chatflow-to-load/23436 "2020-07-27T18:12:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex28](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alex28/32/25270_2.png) [@alex28](https://community.hubspot.com/u/alex28)\
**Post date:** [July 27, 2020, 6:12pm UTC](https://community.hubspot.com/t/how-to-select-which-chatflow-to-load/23436/1 "2020-07-27T18:12:27Z")

</div>

I have a custom-built website and would like to load two different chatflows in different scenarios.  
Chatflow #1: This is a sales-oriented chatflow that will be shown to unauthenticated users on my website.  
Chatflow #2: This is a customer support chatflow that will be shown to authenticated users on my website.  
From the Chatflow SDK documentation, I can’t seem to choose which chatflow to load; it’ll just load all of them. My users are not contacts in HubSpot, and many of the pages are shared between all users. This means the targeting options available won’t work.  
Is there any way to specify which chatflow to load?

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [July 29, 2020, 8:23am UTC](https://community.hubspot.com/t/how-to-select-which-chatflow-to-load/23436/2 "2020-07-29T08:23:24Z")

</div>

Hey @alex28,

One possible workaround that you can explore (_in which I mentioned on this [dev forum thread](https://community.hubspot.com/t5/APIs-Integrations/Start-Chatbot-on-button-click/td-p/348395))_, is that your team can try triggering the chat flow based on a query parameter.

Within the chatflow target rules, they can set the website page whose URL includes specific query parameters. You can learn more on this article [Create a live chat](https://knowledge.hubspot.com/chatflows/create-a-live-chat); specifically under point 2.

In this case for chatflow #1 perhaps the query parameter can be something like _?view1_ and chatflow #2 query parameter can be something like _?view2_.

What do you think?

---

<div class="post-metadata">

**Author:** ![alex28](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alex28/32/25270_2.png) [@alex28](https://community.hubspot.com/u/alex28)\
**Post date:** [July 31, 2020, 12:34am UTC](https://community.hubspot.com/t/how-to-select-which-chatflow-to-load/23436/3 "2020-07-31T00:34:30Z")

</div>

Hi @WendyGoh,

That is a great idea, and I appreciate the suggestion. It would require more website changes than we’d like, so I’m not sure if that is feasible at this time. We’ll explore other options.

Thanks,

Alex
