Best Answer

Unable to import courses via CSV with mandatory additional field

  • 3 September 2022
  • 5 replies
  • 264 views

Userlevel 1

Hello! 

I am using the Automation app to create course shells with a CSV file upload. I have setup a scheduled rule which, once a CSV file is added to an FTP folder, imports the courses using a custom import schema. 

The process itself works absolutely fine. However, we now have a mandatory additional course field, which causes the import to fail and sends the following error on the log:

Invalid option 'field_1’
The additional field is a dropdown list, so I have assumed that the value should be the string value of the dropdown option, as per the information for managing uses via CSV on this page: https://help.docebo.com/hc/en-us/articles/360020128839-Importing-and-Managing-Users-via-CSV-Files

...But clearly this is not working, and we can’t leave it blank because it’s a mandatory field. 

Does anyone know the correct way to reference a dropdown value when importing via CSV, please?

icon

Best answer by trouk 7 September 2022, 16:48

View original

5 replies

Userlevel 7
Badge +5

@trouk Interesting question … just remember that the automation app and course shells aren’t the same as users, so the same “rules” don’t necessarily apply.

When you import with the Automation app, you have to define the schema (the map of columns to fields), and I don’t see anything on that list of attributes that shows additional fields or enrollment fields. This indicates to me that what you want to do isn’t supported, but confirming with Docebo Help would be a good idea.

 

Would love to hear the workaround you come up with.

Regards,

KM

Userlevel 1

@KMallette thank you for your reply! You raise a very good point – perhaps the same rules do not apply. I am unable to find a specific support article on the Docebo website, after all.

However, when additional fields are created (Course Management>Additional Fields), these then become available as options to define as part of the import schema for CSVs. For example, in the screenshot below, I’ve created a test additional field and added it to my import schema.

 

 

I’m not sure why additional fields would be available to include in the import schema if they were not supported. We’ve raised the issue with our Docebo contact, so hopefully we will have an answer soon. In the meantime, our workaround will be to make the affected fields non-mandatory so that they do not block the import.

I will keep you updated on our progress 😊

Userlevel 1

With help from Docebo Support, I have now managed to resolve the issue. 

To reference a dropdown value of an additional course field, the Value ID (and not the string of the dropdown option) must be used. 

These values can be retrieved using the Docebo API: “Retrieves the list of all course additional fields, optionally filtered with the input parameters”  (/learn/v1/courses/field).

For example:

        "dropdown_options": {
          "3": {
            "type": "single_value",
            "value": "This is the dropdown option text",
            "values": []

In the example above, I would need to type ‘3’ onto my CSV file in order to retrieve the relevant dropdown option and for this to be populated into my course shell.

The Docebo team have assured me they will update the documentation to avoid confusion.

Userlevel 1

Hey Community! I also wanted to point out that this has been updated in the Knowledge Base at the below link:

https://help.docebo.com/hc/en-us/articles/360020082520-Creating-a-Rule-for-the-Automation-App#h_01FHZ4DNTG469Z69J0128Y8CZB:~:text=If%20you%20are%20importing,to%20Docebo%20APIs

Thank you for your assistance in getting this added Trouk. This post and your answer just helped one of our other Docebo clients in an open ticket :)

Userlevel 7
Badge +3

Hey Community! I also wanted to point out that this has been updated in the Knowledge Base at the below link:

https://help.docebo.com/hc/en-us/articles/360020082520-Creating-a-Rule-for-the-Automation-App#h_01FHZ4DNTG469Z69J0128Y8CZB:~:text=If%20you%20are%20importing,to%20Docebo%20APIs

Thank you for your assistance in getting this added Trouk. This post and your answer just helped one of our other Docebo clients in an open ticket :)

Thanks @andrew.charles , great to know!

Reply