How to resolve the import entitlement error : Import template customized resulting in one or many fields being invalid?

Niharika Raj
Kilo Guru

Hi,

We have SAM Professional plugin enabled in our system and our client has a requirement to create software entitlements via a REST API call to a third-party tool. I am getting the data from the integration in JSON format and want to utilize the OOTB Bulk upload entitlement API to create the entitlements.

I was successful in finding out the OOTB scripted REST API (API ID : samp_upload_excel) and using it via script to transform an xlsx file. For my requirement, I needed to generate an xlsx file from the received JSON in which I was successful.

However, when I am trying to use the OOTB API for the newly generated xlsx file, I always get the error : 'Import template customized resulting in one or many fields being invalid'. I had kept all the headers same as the template provided OOTB but since the scripts for transformation is protected, I could not check anything further.

I had read somewhere that we can't use a programmatically-generated file for importing entitlements, rather, we need to re-use the existing template.

Could you guys help me with getting a way to re-use the OOTB API via script?

Thanks in advance!

Regards,

Niharika Raj

1 ACCEPTED SOLUTION

Niharika Raj
Kilo Guru

Hello,

We found the reason for this issue. Turns out, the reason in the entitlement import error (Import template customized resulting in one or many fields being invalid) was misleading and we were, in fact, missing a combination of values in the excel that we were trying to use.

All these fields are mandatory for the import to work :
Publisher part number
License type
License metric
Rights per pack
Number of packs
Agreement type
Start date
End date

Since our import file was missing a few of these field values, we were getting errors.

Regards,

Niharika

View solution in original post

3 REPLIES 3

Frank1975
Kilo Guru

Hi Niharika, 

quick question upfront. When did you enable the plugin. 

When i went life with SAMP and enable the plugin, i did the OOTB import via Excel and got a lot of import errors as well. The reason for that was , that the samp_sw_product was not fully populated from the content library. it should list close to 200k records in there. Same issue with the samp_sw_product_definition table where the part numbers are stored. (close to 150k records)

Just a thought.

 

thanks

Frank

Hi Frank,

We imported the software products and publisher part numbers prior to the entitlement upload. We still got a few records where the part numbers were not in the system but the reason in the entitlement error was 'Publisher Part Number not found' for them.

However, the error 'Import template customized resulting in one or many fields being invalid' always comes along with the other errors for a file created by script (screenshot below).

find_real_file.png

 

Thanks,

Niharika

Niharika Raj
Kilo Guru

Hello,

We found the reason for this issue. Turns out, the reason in the entitlement import error (Import template customized resulting in one or many fields being invalid) was misleading and we were, in fact, missing a combination of values in the excel that we were trying to use.

All these fields are mandatory for the import to work :
Publisher part number
License type
License metric
Rights per pack
Number of packs
Agreement type
Start date
End date

Since our import file was missing a few of these field values, we were getting errors.

Regards,

Niharika