kentico-ericd / kontent-google-sheets-add-on

Using this Google Sheets add-on, you can import new content items in Kentico Kontent, or update existing items. This can be handy when migrating content from an external database or CMS, or if your editors prefer to work in spreadsheets.
MIT License
4 stars 3 forks source link

Enable import of codename #6

Closed ViForc closed 3 years ago

ViForc commented 3 years ago

The way I understand it, the current implementation uses the contents of the "name" column as the codename so that assuming there are no duplicates, name and codename are the same in the imported data.

I am trying to import some strings that have an ID and a value. I'd like to keep the ID as the codename and make name a readable string based on the value.

Having my original ID as the codename will make it easier for deployment tools. The alternative, creating a text field to store the original ID, adds complexity and produces a less-user friendly view of the items in Kentico Kontent

example: My data: Key ID: question_433d4259-6294-48ba-bab4-1704793f1a28_help_text Key value: Diabetes is a lifelong condition that causes a person's blood sugar level to become too high. There are 2 main types of diabetes: Type 1 Diabetes • Usually diagnosed in childhood • Isn't linked with age or being overweight • Treated with insulin injections

What I would like to see in Kentico Codename: question_433d4259-6294-48ba-bab4-1704793f1a28_help_text Name: _Diabetes is a lifelong condition that causes User-facing string: Diabetes is a lifelong condition that causes a person's blood sugar level to become too high. There are 2 main types of diabetes: Type 1 Diabetes • Usually diagnosed in childhood • Isn't linked with age or being overweight • Treated with insulin injections

Since the key IDs in my original data are unique, they should generate unique codenames but if there was a duplicate codename I would like to see an error rather than a new codename created.

kentico-ericd commented 3 years ago

Hello @ViForc 👋

Thanks for the suggestion! The main reason that the ability to specify a codename doesn't currently exist is that it's generally not "important" in regards to the imported content item. If you're integrating your content with some external system (which you probably are if you're using this add-on), the external_id should be used as the "key" which links the data between Kontent and your system.

You can read about external IDs here. It's always best to reference these IDs when importing content, as opposed to the code name. With that said, the add-on should still have the ability to specify codenames upon import, so I will add it 👍