DeskDirector / UserVoice

Feature request tracker
14 stars 2 forks source link

[40300] Ability to add query parameters when adding an "Extension Link" Link menu item #663

Closed iskolares closed 2 years ago

iskolares commented 2 years ago

Query parameters can be added to "Extension Menu" menu item, but it's usage will be a bit limited because of it being iframed to the client portal.

Cust is asking if it's possible to also add "Query Parameters" when adding an extension link, so they can use it and not run into the restrictions there are on iframed extension menus.

DevanMorrison commented 2 years ago

Right now we will be using the Learning Center as a workaround, as we can pass over a similar setup as query parameters and force a new tab when launching the link. We'd essentially like a similar feature with the Menu Items within the portal when launching external links as we would get with embedded links. This would allow for a seamless transition for our customers, and the ability to pass personalization to the other end for a better user experience.

Nness commented 2 years ago

You can query /api/v2/portal/user in your transition page, then you know who that user is. Make sure add your transition page as part of CORS exclusion list. Under admin portal => Advanced => Developer Corner

DevanMorrison commented 2 years ago

You can query /api/v2/portal/user in your transition page, then you know who that user is. Make sure add your transition page as part of CORS exclusion list. Under admin portal => Advanced => Developer Corner

Can other non user APIs be pulled with this? We brand the pages moreover for each company on the transition not necessarily name? Thanks!

Nness commented 2 years ago

Here is more detailed procedure on how to achieve.

  1. User click on the link and navigate to your transition site
  2. Transition site hit https://{deskdirector-domain}/api/v2/portal/user. If 401 unauthorized display unauthorized.
  3. While loading on that user, you can display loading indicator.
  4. Once user is loaded, based on user's company and who they are, you can then use JavaScript to navigate to different page. By using location.href = 'https://xxxx'.

In the user info, you will see user's company id, company name, user name, user id etc. As long as you have user's cookie. When query, if you encounter browser saying CORS, you cannot view the content of the API response, go to admin portal => advanced => developer corner to add your transition site's domain to the list. Then it should work as expected.

Nness commented 2 years ago

This has been implemented, to access go to staging admin portal. It should be live in staging 10 min later.

Normal admin link admin/v2, staging admin link admin/staging