Create Tag based maps using script or ETL

Prabhjyot Sing1
Mega Guru

Hi,

 

I have a requirement to create tag-based maps from the tags coming from an integration

 

I want to automate the process by creating the maps from ETL.

Does anyone have any reference on how can I create a tag-based map from a script or from ETL.

 

Regards,

Prabhjyot Singh 

5 REPLIES 5

abbasshaik4
Tera Sage

Hi @Prabhjyot Sing1,

 

For a similar kind of issue, please refer to the link below;

https://www.servicenow.com/docs/bundle/washingtondc-servicenow-platform/page/product/configuration-m...

 

If it is helpful, please hit the thumbs up icon and mark correct in future by referring to this solution it will helpful to them.

 

Thanks & Regards,

Abbas Shaik

SK Chand Basha
Kilo Patron

Hi @Prabhjyot Sing1 

 

If tags coming from integration those sits in cmdb_key_value table, based upon the tags create tag categories link it to tag based service family, to complete the tag based map with out manual intervention create a flow to trigger the schedules jobs 

 

1. Trigger update candidates schedule job

2. Create a custome schedule for choose the candidate / Map selected

3. Create a schedule for Schedule for Capitalise the Name of map

4. Trigger Recaculate service schedule. 

 

How to run schedules from flow ? 

 

Need to create a custom action to trigger job

 

https://youtu.be/1fjfdOfjXO0?si=Vd7GxX1fJmm_Hfzz

 

 

Mark it help and accept solution!! If this helps you to understand. 

 

Kieren
ServiceNow Employee

Just replying to this thread since it was high in my search results when I was looking into the same topic.

It is possible to skip the candidate phase and create a service directly if you're doing this via some sort of import or script.

var util = new SMServiceByTagsUtils();

// svc_tag_categories names + the values for thsi specific service
var metadata = [
	{category:"App Name",value:"AppName"},
	{category:"Environment",value:"Test"}
];

var fieldMap = {
	name: 'AppName::Test',
	partial_metadata: JSON.stringify(metadata),
	service_family: '<sysid of the service family>'
};

util.createOrUpdateServiceFromFieldsMap(fieldMap, '<null|sys_id if updating>');



cartergray7
Giga Contributor

You may be able to automate it using the platform's API or scripting interface if tag-based map creation is supported. Share your ETL tool and platform version for more specific guidance.