logo

NJP

ServiceNow Normalization – Part 2 – Normalization Data Services

Import · Aug 16, 2023 · video

foreign welcome to part two in this series on normalization in servicenow the first feature that we're going to look at is normalization data services which is used to normalize company names only company names is actually like a really good use case for normalization because we refer to company names everywhere in the platform internal company names customers Publishers manufacturers Etc and we just want to make sure that the names the entities that we are referencing are standard normalized values that we don't have any variations in that so how do we actually normalize company names well we do retain The Core Company table so that remains our gold standard for our company names our source of Truth and we add two new tables the CDs client name which is the normalized company name which actually comes from servicing as a table maintained by servicenow and then we have a second table called CDs client mapping which contains all our variations or variants of that normalized company name setting this up is relatively straightforward we actually have the advantage in that there is a guided setup specifically for this feature so if we come down to user Administration normalization data services and then go to the guided setup we just need to start this and have a look at the different steps here so as you can imagine the very first step is to activate a plugin I already have this plugin installed as we can see here so we can move straight on to the second step which is to download the normalized data from the normalization data service so from this sort of central content repository provided by servicenow so just go to configure here and click on start download so once that's finished we can click on close and Mark that task as complete and now if we go to the normalized company names table we can see this is all the data that we have downloaded so these are the normalized values that we get from that Central servicenow Repository if we just look for servicenow here and open up that one we can see that servicenow is the normalized name and then we have the normalized mapping so these are the variants for servicenow so now if we come back to the guidance setup and come down to the third step here so now we can move on to the next step which is to update reference qualifiers now before we do that what's going to happen here is that we're going to add a new field to the Core Company table here called normalized and these reference qualifiers will reference that field to only accept normalized company names so we're going to add reference qualifiers to many references to this table not all of them as we'll see a little bit later but to many of these references so for example in the um computer table here if I go to the manufacturer we can see at the moment that we've got a reference to possibly to 406 entries which is actually what we had in the company table so at the moment there's no reference qualifier but we will change that once we go through this step in the guided setup if we go to the company field however there is already a reference qualifier attached to this field you can see only 17 companies have been displayed here that reference qualifier won't be modified however if we look at another example in the software model record the publisher will be updated with a reference qualifier if we go to a software entitlement record the company will be updated here with a reference qualifier however in the financial tab here the vendor will remain untouched okay so as I said some of these references will be modified with the reference qualifier but others will not so just have to be aware of what's going to change and and whatnot okay so if we come back to the guided setup and just start that we can see the list of tables for which your reference qualifier will be added and we can just go ahead and start the update okay so once that is completed we can close that Mark that task as completed and now if we come to the company table again and just open up an existing record and go to the XML we can see there's a new field here called canonical it's actually the the technical name of this field the display name is called normalization and you can see here it is set to false so what we'll do we'll just close that if I go back to the list here and then just change the personalization to add the normalized field here and click OK we can see here that actually well in this the first 20 records all of them uh have set normalized to false there are actually a few records here where normalize a the normalized value is true but most of them have been set to false by default we'll change that in the next step but at the moment most of them have been set to false which means now if I go to a computer record and try and add a manufacturer here I'll only be able to add 10 of those because we're only accepting now company names that have been normalized okay if you go to the properties of that field here and we can see there's a new reference qualifier there that JavaScript reference there which basically just means that we're looking only for or accepting only normalized company names there all right if we go back and just have a look at to see which company names have been normalized at the moment yeah there's only 10 of them here some of the main manufacturers there all right so let's go back to our guided setup and complete the next step here which is normalization properties as we can see here there's a few normalization properties the first one is enabled which references those reference qualifiers that we just discussed so if you want to disable them and not use those reference qualifiers you can easily disable that feature here the next two properties refer to using the normalization feature when you are importing records either via Discovery or via some other means to normalize company names in that process of doing the import the second last one here using the normalization API it's a little bit ambiguous here what that is you won't find I don't believe any documentation on what exactly the normalization API actually consists of but what this will concretely mean we'll see a little bit later because whenever we create a new company record in that Core Company table at the moment if that property is disabled then the normalization flag will be set to false by default but if we were to enable that property whenever we create a new company record in that table it will be normalized by default or the value of that field normalized will be set to true and then the last one here uh that's actually a specific use case if you happen to have more than one company name that happens to be normalized so that flag has been set to True before you activate normalization data services uh there's a way in which the system can then Mark the others the kind of the duplicates it's not normalized at any level one as normalized but there if you go to the documentation here there is a link here to a respective article on the support page where you can read up a little bit more about that particular property okay so if we Mark that step as complete and move on to the next one normalize configuration items this will actually do two things so yes it will normalize your references to uh companies in the cmdb to only use normalized values okay so we'll search for those variants if we find any of those variants they're going to be normalized but it will also set the normalized flag to true in all of your records in the Core Company table as well that's actually not described here in the guided setup but it will do that as well so as we saw earlier most of our records in that table were not normalized they actually had that flag set the force but that will change as soon as we go ahead and complete that step but maybe before we do that I'm going to go back to the companies table here we can see here we've got quite a number of Acme company references here and if we go to the normalized company names we've actually got funnily enough uh an Acme Corporation there as well for demonstration purposes and if I open up that we can see we've got a few variants of Acme Corporation including Acme Inc okay so now if I go back to the company's table we can see we've already got a reference to Acme Corporation there we don't have an Acme ink so what I might do here is just create that as a variant so that when we create a or we go ahead and normalize those configuration items any Ci's that have Acme ink as a reference for the manufacturer should be normalized to Acme Corporation okay so I'll go ahead and save that and we can see here now that both of those values or both of those companies have the normalized flags at the false okay so two references to Acme both of which have not yet been normalized even though we have a reference to Acme Corporation as a normalized value from the the data service okay so all I'm going to do now is go ahead and create a new demo computer here for Acme computer and put in Acme ink as the manufacturer now at the moment I won't be able to do that in the form because there is that reference qualifier that we've just enabled so we actually won't find that reference here so what I'll do instead I'm actually going to go ahead to create a record using a background script so we can circumvent that reference qualifier and put in the name here and then take the sysid for Acme Inc I'm just going to pop that in as the manufacturer and then create that record okay so now if we come back here and search for that record we can see we've now got one computer Acme computer with the manufacturer Acme Inc great okay so let's go back now to our guided setup and then run that normalized configuration items step okay that doesn't take too long to complete so now if we come back here to our companies table and refresh that list we can see here we've actually got two references to Acme Corporation only one of which has been normalized because that's the actual name that we've got from our content service okay and Acme Inc is also not normalized so in other words it's a variant okay again if we go back to our normalized company names here we can see Acme Corporation in or Acme in uppercase there which is our variant one variant and our other variant was Acme ink so now they have been both set to false in our Core Company table all right so if we come back to our computer now and just refresh this we can see the manufacturer now has changed to Acme Corporation okay so if we go back now to our guided setup the last two steps here are similar to the one that we just executed so but instead of normalizing names in the cmdb we're going to normalize references to the company in our product models or cmdb models and as well as in software Asset Management various tables that reference the company table there but before we conclude I just want to give you one last Quick demonstration here for when we create new companies as well as new configuration items now just so that we understand and clear on how we can now take advantage of that normalized company name and the normalized data services because at the moment if I were to create a record with a variant they will not be normalized okay so we'll have to enable a system property but let's just take a quick look now so what I'm going to do here I'm going to create a new record here called Acme Sweden with Acme in lowercase apart from the bay and we can see that the normalized flag is actually set to false so even though we went just went through and normalized everything that was in this table more or less if I create a new record here it's set to false okay even though we don't have it in our normalization data service yeah there's actually no reference to Acme suite and there there's reference to here to that company here but not in our normalization table okay and that's to do with the fact that if we go back to our system properties here we've left this system property disabled this normalization API so if I were to enable it here now save that record it's going to go ahead and delete Acme Sweden here credit again save it and now we can see that the normalized flag has been set the true automatically okay so something to be aware of we go back to the system properties so we can see here that those uh the second and the third one are still disabled so come back now to my company names here my normalized company names rather we're going to see the Acme Sweden is not yet there but I can actually add my own entries here so even though this list came originally from servicenow we are able to maintain or create new entries here so if I create a new one here and so that the normalized company name is Acme Sweden uh or uppercase for Acme I'm going to say this applies to the Core Company table and the name field and save that record you can see here that Acme Sweden lowercase is still normalized okay so I'm actually going to change that to uppercase here just so that we have proper record keeping here for our little demo so now I'm going to go ahead back to that normalized company name record and I'm going to create variance now for Acme Sweden I'm going to say on the one hand we may have a record of this as Acme Sweden so lowercase Acme for the Core Company table and the name field and I'll just go ahead and create one more example here to say Acme SE Okay so we've got our two variants Acme SE Acme lowercase Sweden all referencing the normalized name of Acme Sweden all right so now if I come now to create a new company record Acme SE and save that come back to our company's list here we can see that normalized has been set to force and that's what we expect okay because that is actually a variance a normalized value we're still able to create these variants in The Core Company table we can credit as many you know inaccurate you know records or unnormalized records as we like but remember those reference qualifiers will be used in a lot of places to only select normalized values all right so now if I go to a uh a new record here actually to create a new computer again I'm going to use a script again because I won't be able to create a record referencing a variant company name using the form so I'll need to do it here so I'm going to put in Acme Suite in here lowercase and I'm going to take uh Acme Sweden's uh sysid and pop it in there okay we've got a record created so let's see the result here okay go back to our computers there and we can see here that what Acme SC was the one that I used uh that has not been normalized okay so why was that because we haven't enabled that system property okay so we actually come back if I just go ahead and delete that first come back to our properties here we can see that this second one here it enables a business rule that automatically normalizes manufacture names for configuration items okay so so when you're doing Imports or through whatever mechanism you're using we will need to activate this property so that we actually use this normalization feature by default and we could also go ahead and enable that third property as well because then we'll enable it for Discovery as well okay so we say that we go ahead now back to my background script I'm going to use the same values here create that record again and now if we come back to our list of computers we can see now we've got the normalized value so that's how we use normalization data services in servicenow to normalize company names as we've just seen it's reliant on company names being downloaded from essentially a Content service from servicenow and then we are enabling certain system properties to allow for the creation of normalized company names yes or no and also if we want to when we're creating records that are referencing the company table if we want those values in those records to be normalized as well yes or no so in the next video we're going to take a look at field normalization which is similar actually has some similar aims as normalization data services but it's actually a little bit richer it actually offers a little bit more a few more advantages and what you can do with normalization data services so stick around for that one foreign

View original source

https://www.youtube.com/watch?v=nPVV4d4B00s