HPE Morpheus Enterprise
1838135 Members
3095 Online
110124 Solutions
New Discussion

ServiceNow CMDB Mapping with custom inputs

 
SOLVED
Go to solution
AungKT
Regular Advisor

ServiceNow CMDB Mapping with custom inputs

Hello Experts,

Are we able to use custom inputs ( <%=customOptions.fieldName%>) in SNOW CMDB custom mapping?

The idea is that the user orders the service catalog with this custom input, and CMP uses this input to create CI records in SNOW by using custom mapping as below.

{
“object_id”:“<%=instance.name%>”,
“SN_field_id2”:“<%=customOptions.fieldName%>”,
“SN_field_id3”:“<%=morph.varname3%>”
}

Thank you,
Aung

2 REPLIES 2
AungKT
Regular Advisor

Re: ServiceNow CMDB Mapping with custom inputs

Thanks a lot @cbunge for your quick respond.

Regards,
Aung

cbunge
HPE Pro
Solution

Re: ServiceNow CMDB Mapping with custom inputs

I believe you should be able to. Other variables like instance.xxx are typically not available until after the machine begins creation, which is also when customOptions are available. I see in one of our environments we have customOptions configured with SNOW like:

{
“host_name”: “<%=instance.hostname%>”,
“guest_os_fullname”: “<%=instance.container.server.platform%>”,
“u_ambiente”: “<%=customOptions.ambiente%>”,
“u_guest_os_version”: “<%=instance.container.server.platformVersion%>”,
“u_cmp_resource_group”: “<%=group.name%>”,
“u_server_role”: “<%=customOptions.serverRole%>”,
“u_morpheus_instance_id”: “<%=instance.id%>”
}