Best Answer

Docebo Connect: accessing User Additional Fields

  • 10 October 2023
  • 15 replies
  • 132 views

Userlevel 6
Badge +2

Hi all

I’m dipping my toes into Docebo Connect, and am a bit stuck on what should be a basic task. I want to get values from User Additional Fields, but the Get User by ID function does not seem to return them. It returns all of the standard user fields, but not the custom ones we have created.

Does anyone from the community have any insight into this? 

Many thanks,

Alan

icon

Best answer by Bfarkas 11 October 2023, 15:38

View original

15 replies

Userlevel 7
Badge +1

Which specific API endpoint are you calling?

 

I am using Workato (which is the engine underneath Connect) and a custom HTTP endpoint and both /manage/v1/user/{id} and /manage/v1/user return all user details including custom fields.

The former provides full details of the additional field, while the latter only the value.

{ "id": "8", "title": "Job Title", "type": "textfield", "mandatory": false, "invisible_to_user": false, "settings": null, "sequence": 7, "value": "Chief Information Security Officer", "enabled": true },

vs

"field_8": "Chief Information Security Officer",

 

Userlevel 6
Badge +2

Hi @alekwo 

Thanks for the reply. So far I have been using the standard data pill from GetUserbyID.  I’ve not delved into custom functions just yet, which I think is what you are doing in the above?  

 

Userlevel 7
Badge +1

@Alan the first thing to do is to use the Refresh button in the Editor. 

If you have added those additional fields only recently, this should refresh the schema of the response returned by Docebo, and add any additional fields to the list of data pills (considering that they configured the connector to handle the dynamic list of fields). 

 

We’re not using the Docebo connector, as it wasn’t available on a vanilla Workato. We are using a plain HTTP request to the API. 

 

Userlevel 6
Badge +2

@alekwo, the additional fields have been in place for a long time, so they should already be getting returned. However, it looks like the Get User by ID function doesn’t include all of the fields that are available from the standard API end point that you are using. 

I suppose I could try creating a Custom Action that replicates what you are doing, but seems strange that the full set of user additional fields is not supported out of the box by the Docebo Connector...

Alan

Userlevel 7
Badge +1

@Alan maybe reach out to Docebo support and ask if this is something they can fix on their side.

If it’s not a result of a bug that can be fixed easily, it will probably require an adjustment in the connector’s code.

Userlevel 7
Badge +3

Hi @alekwo 

Thanks for the reply. So far I have been using the standard data pill from GetUserbyID.  I’ve not delved into custom functions just yet, which I think is what you are doing in the above?  

 

Sounds like they didn’t build in additional fields into the wrapper for it. Tried to confirm but the documentation is sparse, so might want to confirm that with support in case a bug. I will say the additional fields do often get complicatied to generalize since everyone’s platforms are so specific, have struggled adding them to similar setups before that were not just made for me.

Userlevel 6
Badge +2

Hi @alekwo @Bfarkas 

Thanks both! It does indeed look like one for support. I’d be kind of surprised if nobody else has raised this with them before, seeing as UAFs are so central to a lot of use cases. Also, the Update User action does support the UAFs and allows values to be assigned to them. 

My aim is to read a value from one field (Jurisdiction) and use that to assign a value to a different field (Region). I can do the latter, but not the former 😏

Alan

Userlevel 7
Badge +1

I will say the additional fields do often get complicatied to generalize since everyone’s platforms are so specific, have struggled adding them to similar setups before that were not just made for me.

That’s true, still other connectors I’m using in Workato - like Salesforce or NetSuite can handle all custom fields that we add to those platforms, including our picklist values, etc. So, it’s certainly doable to handle the list of additional fields but will require some extra work on Docebo’s side.

Userlevel 7
Badge +3

Hi @alekwo @Bfarkas 

Thanks both! It does indeed look like one for support. I’d be kind of surprised if nobody else has raised this with them before, seeing as UAFs are so central to a lot of use cases. Also, the Update User action does support the UAFs and allows values to be assigned to them. 

My aim is to read a value from one field (Jurisdiction) and use that to assign a value to a different field (Region). I can do the latter, but not the former 😏

Alan

Ha, well then I remove my “benefit of the doubt” excuse. If it’s built into the one, it should be in the other already, that’s crazy. 

@alekwo agree, was just more, some folks think it’s simple and it’s not as straight forward, it should be there though especially on the specific one by ID

Curious @Alan , is there any kind of documentation of the specific connector abilities? I only see ones about third party setups, just curious if I am missing something or should post an idea, helps to design things. 

Userlevel 6
Badge +2

Hi @Bfarkas 

Curious @Alan , is there any kind of documentation of the specific connector abilities? I only see ones about third party setups, just curious if I am missing something or should post an idea, helps to design things.

Not as far as I know. There are bits and pieces in some of the Docebo University courses that use the Learn connector, but other than that it’s a case of experimenting in Connect itself. At Inspire I did mention to the Docebo product team that they should add more documentation and tutorials for the Learn Connector, considering how much potential it has. 

By the way, out of interest, what API endpoint do you use to get user additional field values for a given user?  I find that the /api-browser/#!/manage/User/User_manage_v1_user_[user_id] one only returns the standard Docebo additional fields, not the ones we create ourselves…

Alan

Userlevel 7
Badge +3

Hey @Alan I use that one, /manage/v1/user/{user_id}, and I just double checked, but am seeing the custom fields when I call it. Sounds more and more like maybe there is a bug or something on your instance?

Thanks for clarifying, made an idea below about the documentation:

 

Userlevel 6
Badge +2

Just one final question (probably! -  I’m at the start of the learning curve for interacting with APIs, but making progress) 

I have managed to get a custom Workato action to return the details of a single user using the above end point, but the Additional Fields part of the response contains all the possible values a field can contain, rather than the specific values of that user. Below shows the data being returned for the jurisdictions additional field:

Do you know what I might be doing wrong?  I think if I can understand this, it will be a big step forward in my understanding of how the API works.

Many thanks!

Alan

Userlevel 7
Badge +1

The selected option is in the value: field.

You can then use the list of Options to obtain the text label assigned to this value (if needed).

 

Userlevel 7
Badge +1

As said earlier you can also use the endpoint GET /manage/v1/user?search_text=username (here you need to use a URL-encoded username, not the user ID).

This will return values of additional fields as labels. 

 

 

 

Hi @Alan 

Did you work out how to pull additional fields from an object such as a user or a course?

It seems incredibly convoluted to make API calls and sift through the results just to access a field of data.

 

Asking because I want to simply pull back a value in Course -> Additional Fields -> Certificate Name via Docebo Connect and it seems I can’t…?

Reply