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?
Best answer by troukView original
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.
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 😊
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).
"value": "This is the dropdown option text",
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.
Hey Community! I also wanted to point out that this has been updated in the Knowledge Base at the below link:
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 :)