---
sourceDocument: Brazil Asset Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-asset-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Asset Management

ft:clusterId :

    - itam

bundleId :

    - itam

workflow :

    - Technology


---

# Sample payload for BYOL

# Sample payload for BYOL {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Sample payload for BYOL

This content provides a sample payload structure designed to populate theSoftware Installation \[cmdbsamswinstall\]table within a ServiceNow instance using discovery data collected under the BYOL (Bring Your Own License) licensing model.
This approach integrates third-party discovery sources with Software Asset Management (SAM), ensuring accurate license tracking and compliance.
Show full answer Show less  
BYOL requires specific entities and their relationships to be accurately represented and linked in the payload for smooth integration with software asset connections. The payload hierarchy begins with the **Cloud Service Account** entity and includes dependent entities such as AWS/Azure Datacenters, Cloud Hosts, Virtual Machine Instances, Computers, and Software Installations.

## Key Entities and Their Required Fields

* **Cloud Service Account \[cmdbcicloudserviceaccount\]** : Requires a unique *accountid*.
* **AWS/Azure Datacenters \[cmdbciawsdatacenter\] / \[cmdbciazuredatacenter\]** : Require a unique *objectid*.
* **Cloud Hosts \[cmdbcicloudhost\]** : Needed for dedicated hosts (not shared VMs). Requires *objectid* , *name* , and platform-specific fields---*cpucorecount* for AWS and *hosttype* for Azure.
* **Virtual Machine Instances \[cmdbcivminstance\]** : Requires *objectid*.
* **Computers \[cmdbcicomputer\]** : Requires *name* , CPU details (*cpucount* , *cpucorecount* , *cpucorethread* ), and must be marked *virtual=true* to indicate VM status.
* **Software Installations \[cmdbsamswinstall\]** : Related to Computers, includes *publisher* , *version* , *displayname* , and cloud license details---*cloudlicensetype* (BYOL or License Included) and *cloudlicensetypesource* (set to 'thirdpartyintegration' for software asset connections).

## Entity Relationships

* **Hosted on::Hosts**: Links AWS/Azure Datacenters to Cloud Service Account, Cloud Hosts, and Virtual Machine Instances.
* **Runs on::Runs**: Connects Cloud Hosts to Virtual Machine Instances.
* **Virtualized by::Virtualizes**: Connects Computers to Virtual Machine Instances.

These relationships must be included in the same payload to maintain the integrity of data linkage required by the BYOL licensing model.

## Practical Use of the Sample Payload

The provided sample payload demonstrates how to represent a dedicated virtual machine on AWS, including the computer record, its related software installations, the VM instance, the cloud host, the AWS datacenter, and the cloud service account in one structured REST API call.

For multiple dedicated VMs, each VM requires a separate REST API call with its full hierarchical payload, while all software installations on a dedicated VM can be grouped in the related array within a single payload.

## Implementation Notes for ServiceNow Customers

* Ensure all dependent entities and their relationships are included in the same payload to maintain referential integrity.
* Adjust platform-specific required fields such as CPU core count for AWS hosts and host type for Azure hosts.
* Use the sample JSON structure as a template for integrating third-party discovery data via REST APIs into ServiceNow's SAM tables.
* The payload supports deduplication and partial payload handling via API options, helping maintain data quality.

This structured approach enables ServiceNow customers to accurately track and manage BYOL licenses through automated discovery integration, improving license compliance and asset visibility in cloud environments.  
A sample payload that populates the Software Installation \[cmdb_sam_sw_install\] table
in the ServiceNow instance with discovery data collected by the BYOL
licensing model.
Certain entities need to be populated for BYOL to work with software asset connection as a
third party discovery source. The relationship between these entities is crucial for BYOL to
work smoothly with software asset connections. For example, some values required for
populating Cloud Hosts is different for AWS and Azure.
Though the object ID and the name of the host is required for both AWS
and Azure, for AWS, the CPU core count is required and
for Azure, the host type value is required. For details on entities and
their relationships, refer to [Entities for BYOL](https://www.servicenow.com/docs/TyQXiLndDvarx4d~vX0nxw#sample-payload-byol__section_b4d_c5r_nnb) and [Relationships between the entities for BYOL](https://www.servicenow.com/docs/TyQXiLndDvarx4d~vX0nxw#sample-payload-byol__section_xfc_ycs_nnb).

In this example, Cloud Service Account is the topmost entity. All the other entities listed
in the Entities for BYOL table are dependent entities of Cloud Service Account. If an entity
is marked as a dependent entity, then the parent entity and the relationship between that
entity and it's parent needs to be mentioned in the same payload. For example, if you want
to create an AWS data center on Cloud Service Account, you need to
include the Cloud Service Account entity in the same payload; even if Cloud Service Account
already exists in your instance. Similarly, when you create software installations, you need
to include all the dependent entities for software installations all through the hierarchy
in the same payload.

## Entities for BYOL {#sample-payload-byol__section_b4d_c5r_nnb}

{#sample-payload-byol__table_t15_bds_nnb__entry__2}

| Entities | Required fields |
|-|-|
| Cloud Service Account \[cmdb_ci_cloud_service_account\] | account_id -- Unique identifier |
| AWS Datacenters \[cmdb_ci_aws_datacenter\] | object_id -- Unique identifier |
| Azure Datacenters \[cmdb_ci_azure_datacenter\] | object_id -- Unique identifier |
| Cloud Hosts \[cmdb_ci_cloud_host\] Note: Not needed for shared VMs. | * object_id -- Unique identifier * name - name of the host * host_type - host type for Azure. For example, DSv3-Type1 (for Azure hosts only). * cpu_core-count - Total CPU core count of the host (for AWS hosts only). {#sample-payload-byol__ul_ins_pds_nnb} |
| Virtual Machine Instances \[cmdb_ci_vm_instance\] | object_id -- Unique identifier |
| Computers \[cmdb_ci_computer\] | * name - name of the virtual machine * cpu_count - CPU count of the virtual machine * cpu_core_count - CPU core count of the virtual machine * cpu_core_thread - CPU core thread count of the virtual machine * virtual -- indicates if the computer is a VM (always set to true) {#sample-payload-byol__ul_gps_g2s_nnb} |
| Software Installations \[cmdb_sam_sw_install\] Note: Software Installations \[cmdb_sam_sw_install\] is a related entry for Computers \[cmdb_ci_computer\] | * publisher * version * display_name * cloud_license_type - license type of the cloud install (BYOL or License Included) * cloud_license_type_source - source from where cloud license type gets populated. The value is set to third_party_integration for Software asset connections. {#sample-payload-byol__ul_cfp_w2s_nnb} |
[ ]

{#sample-payload-byol__table_t15_bds_nnb}

## Relationships between the entities for BYOL {#sample-payload-byol__section_xfc_ycs_nnb}

{#sample-payload-byol__table_is2_g1y_nnb__entry__4}

| Entity relationships | Type | Parent | Child |
|-|-|-|-|
| AWS/Azure Datacenters -- Cloud Service Account | Hosted on::Hosts | AWS/Azure Datacenters | Cloud Service Account |
| AWS/Azure Datacenters -- Cloud Hosts | Hosted on::Hosts | Cloud Hosts | AWS/Azure Datacenters |
| AWS/Azure Datacenters -- Virtual Machine Instances | Hosted on::Hosts | Virtual Machine Instances | AWS/Azure Datacenters |
| Cloud Hosts - Virtual Machine Instances | Runs on::Runs | Virtual Machine Instances | Cloud Hosts |
| Computers - Virtual Machine Instances | Virtualized by::Virtualizes | Computers | Virtual Machine Instances |
[ ]

{#sample-payload-byol__table_is2_g1y_nnb}

## Sample payload for Computer and Installations for dedicated VM (similar for AWS and Azure) {#sample-payload-byol__section_gmb_pdh_mnb}

In this sample payload, a dedicated computer record is being passed. This computer record
has a related array that contains all the software installations. A VM instance corresponds
to the computer record. Cloud host is the dedicated host on which the virtual machine
resides and the AWS datacenter is to be created on the Cloud Service
Account. If you have multiple dedicated virtual machines, you can send one REST API for each
dedicated virtual machine. For example, if you have 50 dedicated VMs, you need to send 50
REST API calls each having the same payload. All the software installations on a dedicated
VM can be sent in a single payload in the related array.  

    var payload = { 

      'items': [{ 

        'className': 'cmdb_ci_computer', 

        'values': { 

          'name': 'Comp - Dedicated AWS - 1', 

          'cpu_count': 1, 

          'cpu_core_count': 4, 

          'cpu_core_thread': 1, 

          'virtual': true 

        }, 

        'related': [{ 

          'className': 'cmdb_sam_sw_install', 

          'values': { 

            'publisher': 'Microsoft', 

            'display_name': 'SQL Server', 

            'version': '2017', 

            'cloud_license_type': 'BYOL', 

            'cloud_license_type_source': 'third_party_integration' 

          } 

        }] 

      }, { 

        'className': 'cmdb_ci_vm_instance', 

        'values': { 

          'object_id': 'sample_object_id_aws_vm_dedicated', 

          'name': 'VM Dedicated AWS - 1', 

        } 

      }, { 

        'className': 'cmdb_ci_cloud_host', 

        'values': { 

          'object_id': 'sample_object_id_aws_host', 

          'name': 'AWS Dedicated Host - 1', 

          'cpu_core_count': 32 

        } 

      }, { 

        'className': 'cmdb_ci_aws_datacenter', 

        'values': { 

          'object_id': 'sample_object_id_aws_dc', 

          'name': 'AWS DataCenter - 1' 

        } 

      }, { 

        'className': 'cmdb_ci_cloud_service_account', 

        'values': { 

          'account_id': 'sample_account_id_aws_service_account', 

          'name': 'Cloud Service Account AWS - 1' 

        } 

      }], 

      'relations': [{ 

          'type': 'Virtualized by::Virtualizes', 

          'parent': 0, 

          'child': 1 

        }, { 

          'type': 'Runs on::Runs', 

          'parent': 1, 

          'child': 2 

        }, 

        { 

          'type': 'Hosted on::Hosts', 

          'parent': 2, 

          'child': 3 

        }, { 

          'type': 'Hosted on::Hosts', 

          'parent': 3, 

          'child': 4 

        } 

      ] 

    } 

     
     var jsonUntil = new JSON(); 

    var input = jsonUntil.encode(payload); 

    gs.info("Input: " + input.toString()); 

    var options = { 

      "partial_payloads": false, 

      "deduplicate_payloads": true 

    }; 

    var output = SNC.IdentificationEngineScriptableApi.createOrUpdateCIEnhanced('ServiceNow', input, options); 

    gs.print("Output:" + output); 


