Best Answer

Finding the right API/webhook

  • 3 August 2023
  • 5 replies
  • 169 views

Userlevel 7
Badge +5

Hi,

While I am a decent LMS admin, I am a novice when it comes to automation. I always struggle getting started. Here’s a use case that I can’t seem to find “the first step” … after authentication, of course.

Use case:

  1. Learner enrolls in LMS (self-registration) and completes an assigned learning plan. The whole learning plan must be complete before anything else can happen.
  2. When the learning plan is complete, authenticate to “System ID”
  3. Create a unique ID that combines 3Letters_UserUnique ID.
  4. Define the date 90-days out
  5. Send a post to generate a new ID (randomly generated number) with the unique ID + 90-day date
  6. “Snag” the resulting new ID
  7. Post that new ID back to the LMS account it came from into a designated Additional field.

What do I do when I can’t find things in the api-browser or webhooks events that match the steps in my use case? Like, how does the automation get triggered when the LP is complete? Or how does it build this unique ID and date that I need to pass over to the other platform? Does that mean I can’t automate with api/webhooks/Connect? (I have all three options available).

icon

Best answer by Ian 21 September 2023, 15:37

View original

5 replies

Userlevel 7
Badge +6

@KMallette - I say call @Bfarkas :).

Userlevel 7
Badge +5

@KMallette - I say call @Bfarkas :).

@dklinger Why do you think I posted here ??? 🤣

I’ve looked thru his awesome guides already … don’t really see the topic.

I did find this from about 1 year ago  API + completed LP … am hoping for more details in how to simply THINK through how to convert a use case into something automated.

Userlevel 7
Badge +6

Sorry #captainobvious

Userlevel 4
Badge +1

I’m a bit late to this one, and I’m not sure if you’re still struggling with this.

Furthermore, I’m not entirely sure what I could add to Bfarkas’ incredible guides, except to say that if you have the option to use Docebo Connect, there should be at least some way to automate your process. For example:

  • We already know that there is no webhook event for when a learner completes a learning plan, but a couple of workarounds were shared in the post you linked to.
    • Personally, I liked Bfarkas’ suggestion that – in the absence of the real-time trigger that webhooks provide – you poll every hour. Would delays of up to one hour be acceptable for your use case? I don’t know enough about why you want to do this in the first place.
    • Alternatively, if you need this to happen ASAP, then how far can we get with the course completion webhook? Perhaps quite far, albeit with some extra steps. For example:
      1. User completes course, webhook fires. So we now have the user ID and the course ID (amongst some other fields, but not yet the learning plan ID).
      2. But we can get the learning plan ID(s) for a specific course details via GET /learn/v1/courses/{course_id}.
      3. We may now have what we need to check the user’s enrolment status for the specific learning plan(s), via GET    /learningplan/v1/learningplans/enrollments
      4. If data.items[0].enrollment_status = “complete”, we’re most of the way to solving the first problem re: the lack of the “learning plan completed” webhook.
      5. You could set the above workflow up as its own recipe, with the final action being to call the main recipe if everything works (i.e. the course was in a learning plan, and the user’s enrolment status for that learning plan was “complete”). I might recommend doing that, personally, because that way, when you’re looking at how many times the main recipe ran in your Docebo Connect history, it’s only going to show you the times someone did complete a learning plan (not every time a course was completed).
  • As for defining the other variables, I feel that I don’t know enough about your use case to advise on how to do any of these particular things – e.g. Why three letters? Which three letters (does it matter)? What is the specific purpose of this new ID that will end up in an additional field? – but I would say that Docebo Connect can handle all of this and more besides.
    • Often I’ve found that I can get a lot done in one step using a little bit of e.g. Ruby or Javascript. If you worry that this is beyond your skillset, I’d say only that ChatGPT and similar solutions are actually quite adept at translating your intent into simple code snippets that can be used here.

The bottom line, I suppose, is that if you can’t find the right API endpoint or webhook for your specific use case, try to figure out what was the closest match you could find. What information would you have at that point, and what else would that permit you to do? Docebo Connect can help you to fill in the gaps.

Anyway, I’ve probably gone on long enough here. I hope my ramblings were in some way useful. Best of luck!

Userlevel 7
Badge +3

@KMallette - I say call @Bfarkas :).

@dklinger Why do you think I posted here ??? 🤣

I’ve looked thru his awesome guides already … don’t really see the topic.

I did find this from about 1 year ago  API + completed LP … am hoping for more details in how to simply THINK through how to convert a use case into something automated.

Ha, so i am pretty sure this is the post we discussed in person…..sorry for living on the beach all summer and missing it. I believe we talked through the scenario, if not, let’s chat it out!

Reply