Bulk Dynamic CI group request

Passion_of_SNOW
Tera Contributor

I have a requirement to bulk-create 28 Dynamic CI (cmdb_group_contains_encoded_query) groups. I now have to create an Excel template for the client to fill in the details. The idea is to map the Dynamic CIs to Technical Service Offerings later on (or at the same time).

1. Is it possible to bulk-create the Dynamic CIs with the filter conditions?
2. Where do I start? Do I bulk create the CMDB groups first in the CMDB_group table? 

Passion_of_SNOW_0-1777556217922.png


3. Do I then bulk create the Dynamic CIs in the  cmdb_group_contains_encoded_query table?

4. How do I apply the filter conditions?
5. Do I use the background script run or the Transform map?

 

Seems that the filter conditions are saved in a different table called cmdb_group_contains_encoded_query.

6. How does that work? 

Passion_of_SNOW_0-1777556637394.png

 



7. Does the Dynamic CI and CMDB group have a 1:1 relationship? 

2 REPLIES 2

Tanushree Maiti
Giga Patron

Hi @Passion_of_SNOW 

 

Refer this : Synchronize data using a technical service offering 

https://www.servicenow.com/community/common-service-data-model-forum/how-to-relate-dynamic-ci-groups...

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Mathew Hillyard
Giga Sage

Hi @Passion_of_SNOW 

1. You do not create dynamic CIs. The whole purpose of a Dynamic CI Group is that you define conditions and it brings back all the CIs that match those conditions. The Conditions are stored in the CMDB Group referenced in the Dynamic CI Group (up to a limit of 10,000 CIs).

2. Yes, create the CMDB Groups first.

3. No, you must either choose a CMDB Query Builder Query, or build an encoded query on a table with one or more conditions. You can also manually choose CIs but this is not generally recommended unless you have no choice. Think of groups like "New York Windows 2025 Servers" as your Dynamic CI Group. The CMDB Group should contain an Encoded Query that is on table Windows Server, where Location = New York and OS = Windows Server 2025. Then the CIs that meet this criteria are added to the CMDB Group, and once the CMDB Group is referenced in the Dynamic CI Group, you will see records in the Service Configuration Item Association [svc_ci_assoc] table where the Service ID is the Dynamic CI Group and the CI ID is the CI.

4. In the CMDB Group's related lists - usually the Encoded Query related list.

5. No.

6. You enter the desired query by clicking New in that related list, which opens a new CMDB Group Encoded Query record. See 3 above.

7. Yes. A CMDB Group should only belong to one Dynamic CI Group and a Dynamic CI Group can only reference a single CMDB Group.

 

I hope this helps!
Mat