Best Answer

Docebo Flow issues

  • 10 January 2022
  • 1 reply
  • 142 views

I am trying to create a POC for Docebo Flow, and I am running into some issues. I am following the tutorials and have done the following:

  • Created the app launcher
  • Injected the app launcher into a web page. 

I am seeing a javascript typeerror about the DFlow.Kernel not a function when I run my application. Am I supposed to put elements in my webpage to display the button? I’m not sure what I am missing

 

icon

Best answer by andrea.camagni 17 February 2022, 10:41

View original

1 reply

Badge

Ciao @DRamsey 

sorry for the latency of this response, but I hope you were able to solve the issue before reading this comment. :slight_smile:

Actually, the main expectation of Flow is that it’s absolutely autonomous to show itself on the page once the function starts with an authenticated user. Obviously there are 2 ways to pop it up on your page:

  • Standard Icon placed in the corners of your web pages
  • Using a custom position guided by an external CTA on page

Said that, as explained on the KB article →  Embedding Docebo Flow into Your Web Page
let’s see how to proceed to manage the embedding and which are the parameters required to prompt flow in the page with some deeper hints.

on Step 1 → Include the initial kernel resource
<script type=”text/javascript” src=”https://cdn1.dcbstatic.com/flow/kernels/Kernel-latest.bundle.min.js”>

Tip: The src value is based on your platform region and it can change for your production environment.
On your platform launcher page the value of the url is dynamic and it represent always the correct one.

 

on Step 3 and 4 → Use Start and RenewToken of the Launcher

As it’s quite clear on the documentation, Flow can show itself ONLY to authenticated users and to do this it requires 3 different string params:
DFlow.launcher().start(“yourdomain.docebosaas.com”, [VISIBILITY_CODE], [ACCESS_TOKEN]);

The unique point where we need to focus on is the “Access_token”. Without this param you obtain always an error of connection. Let’s bear in mind “Docebo” at this stage is only a service for user authentication and it can’t be used as an external Identity Provider.

What does that mean?
By being the Docebo user “Access_Token” the unique value accepted by Flow (for the time being), the integrator needs always to manage the mechanism to retrive this value from the LMS platform.
To do that, there are several methods, but actually, the most secure one Docebo is suggesting is through the usage of an “OAuth2” Api call using the JWT keys

That API requires always the value of an existing “username” on the LMS platform and this value must be assured by the integrator during the navigation of the user on his navigation session.

By following these instructions you should be able to avoid the javascript type error by using the expected value of the function.

I hope this explanation has been clear but if you are still occurring some issues, comment on the post with some screenshots.

ciao

Reply