Export and Import Record Category - Dev2Prod

Hi,

Is there a way to transfer Record Categories from one tenant to another?

I haven't found a way to view Record Categories in a table, so I'm unable to export them as a CSV file.

I also tried exporting a package using the Master Data > Categories module and even attempted a full customization package to transfer the Record Categories, but neither method successfully transferred the categories.

Any help would be appreciated.

Thank you.

  • Verified Answer

    +1  

    Hi Avi,

    As you'll already have noticed you can't use Package manager to export Categories from one SMAX tenant to import into another. Also there is no csv export capability for this type of Record.

    A potential way of doing what you'd like to achieve is by using the SMAX api's.

    You could use the EMS Api to export your Categories from one tenant and then use the EMS api bulk to load the Categories into your other tenant using the likes of postman.

    There would need to be a slight configuration of your load data, as you'll want to remove any Id from the load data. Below I've shown an example of how you could do it.

    The following links are good for understanding the SMAX api's if you're not familiar with them:

    Login: Connect to the REST API - Service Management Automation X (microfocus.com)

    EMS:  EMS REST API - Service Management Automation X (microfocus.com)

    Ems Bulk: Record bulk update and collection APIs - Service Management Automation X (microfocus.com)

    To extract the current Categories you can use something similar to this:

    GET https://<SMAX_FQDN>/rest/<TENANT-ID>/ems/ITProcessRecordCategory?layout=Id,DisplayLabel,
    Level1Parent

    Then use the EMS Bulk:

    https://<SMAX-FQDN>/rest/<NEW-TENANT_ID>/ems/bulk

    With a body like:

    {
        "entities": [
            {
                "entity_type": "ITProcessRecordCategory",
                "properties": {
                    "DisplayLabel": "IT Hardware"
                }
            }
            
        ],
        "operation": "CREATE"
        
    }
    With the fact that you can use the EMS api you could also use the Integration Engine to do a SMAX to SMAX configuration.
    So it really comes down to what you feel most comfortable with and how you'd best want to extract and load the data.
    Hope that helps.
  • Verified Answer

    +1   in reply to   

    Here are some additional notes.

    You can as well build an Operational Raw Data report and then use the cvs export capability.

    For import, you have the option to use REST directly or through the Integration Studio or a CSV import from the Studio. CSV will only insert data, while REST can cover both creation and update.

    In all cases, as the Record Category has a hierarchical structure, note that for the second level, you need to reference the fist level parent, and, for the third level, you need to reference both first and second level parents, to be exact:

    • Level1: DisplayLabel
    • Level2: DisplayLabel, Level1Parent, Level1ParentId
    • Level3: DisplayLabel, Level1Parent, Level1ParentId, Level2Parent, Level2ParentId

    For the CSV format, you can take a look at the sample file from the documentation

    https://docs.microfocus.com/doc/SMAX/24.3/ImportDataFormat

    go to tabs 5, 6 and 7

    Best regards,

    Brindusa

  • 0 in reply to   

    Thank you for your answers and in-depth explanations!

    I'll consider both approaches, as I'm familiar with the EMS API and CSV importing, and decide which is most appropriate for my use case.