Bulk Upload of Software Entitlements with Multiple Contracts - Supported Format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Experts,
We are implementing Software Asset Management and are currently uploading Software Entitlements through bulk import.
Our requirement is to associate multiple contracts with a single software entitlement.
During our analysis, we found that:
- Contract records must already exist in the ast_contract table.
- While performing bulk upload, the upload succeeds when a single contract is provided.
- However, when multiple contract numbers are entered for the same entitlement (for example, comma-separated values), the import fails with an error.
We would like to understand the following:
- Is bulk association of multiple contracts to a single software entitlement supported OOB?
- If yes, what is the recommended import file format?
- Should contract relationships be loaded through a separate M2M table import instead of the Software Entitlement import template?
- Are there any best practices or examples for importing entitlement-to-contract relationships in SAM Pro?
Additional Context:
- We are working with a large volume of entitlement data and manual contract tagging is not feasible.
- Our objective is to load entitlement records together with their associated contracts through a scalable bulk-upload approach.
Any guidance, documentation, sample import templates, or implementation recommendations would be greatly appreciated.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Shiv Choudhary
Please check followings:
To answer your questions directly:
1. Comma-separated contracts in a single entitlement import field is not supported out of the box. The relationship between software entitlements and contracts is stored in a many-to-many table, not as a direct field on the entitlement record. That is why the import fails when multiple values are provided.
2. The recommended approach is a two-stage import:
Stage 1 - Import your software entitlement records as normal using the standard Software Entitlement import template, either with no contract or a single primary contract if needed.
Stage 2 - Import the entitlement-to-contract relationships separately by targeting the many-to-many relationship table directly. In most SAM Pro implementations this is the samp_sw_entitlement_contract table. Confirm the exact table name in your instance by opening a Software Entitlement record and checking the Contracts related list, then right-clicking the list header and selecting Configure to see the underlying table.
3. Your import file for Stage 2 should have one row per relationship, for example:
entitlement_number, contract_number
ENT0001, CON0010
ENT0001, CON0011
ENT0001, CON0012
ENT0002, CON0010
Use a Transform Map on this import set to resolve entitlement and contract values to their sys_ids and create the relationship records.
4. Best practices for this approach:
Always import entitlement records first and confirm they exist before running the relationship import
Use display values such as entitlement number and contract number in your import file and let the Transform Map coerce them to sys_ids using reference field mapping
Run a small test batch of 5 to 10 rows before loading the full volume
Validate results by spot-checking a few entitlement records and confirming the Contracts related list is populated correctly
This pattern scales well for large volumes and is the standard ServiceNow approach for any many-to-many relationship import.
If this helps, pls click on helpful and accept solution.
Best Regards,
Bharat Chavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We have a large volume of entitlements, so manually tagging contracts is not a feasible option.
Questions:
- What is the recommended OOB approach to bulk associate multiple contracts with a single Software Entitlement?
- Is there a standard import method for populating the entitlement-contract relationship table directly?
- Has anyone implemented a bulk-load solution for this use case in SAM Pro?
- Are there any best practices or limitations we should consider when loading these relationships at scale?
Any guidance, sample import sets, transform maps, or recommended data model approaches would be greatly appreciated.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Shiv Choudhary
1. Recommended OOB approach to bulk associate multiple contracts with a single Software Entitlement
The recommended out-of-the-box approach is a two-stage import using Import Sets with Transform Maps:
Stage 1: Load your Software Entitlement records using the standard entitlement import template (if not already loaded).
Stage 2: Load the entitlement-to-contract relationships by importing directly into the M2M relationship table (commonly samp_sw_entitlement_contract — verify in your instance as mentioned in my earlier reply).
There is no supported OOB mechanism to pass comma-separated or multi-value contract references in a single entitlement import row. The relationship must be handled as separate records in the M2M table.
2. Standard import method for populating the entitlement-contract relationship table directly
Yes — use a dedicated Import Set targeting the M2M table with one row per entitlement-contract pair. Here is the recommended file structure:
entitlement_numbercontract_numberENT0001CON0010ENT0001CON0011ENT0001CON0012ENT0002CON0010
Your Transform Map should:
Map entitlement_number → reference lookup to samp_entitlement (or equivalent) to resolve sys_id
Map contract_number → reference lookup to ast_contract to resolve sys_id
Set the action to Insert only (avoid update/skip logic unless deduplication is needed)
Use Coerce fields on reference fields so display values are automatically resolved to sys_ids without manual scripting.
3. Bulk-load solution others have implemented
A commonly used pattern in SAM Pro implementations at scale:
Export your entitlement and contract data into a staging spreadsheet
Use a VLOOKUP or script to generate the flattened one-row-per-relationship file
Load via System Import Sets → Load Data, then run the Transform Map
Use Import Set Run scheduling if this is a recurring data feed
For very large volumes (tens of thousands of rows), consider splitting the file into batches of 5,000–10,000 rows to avoid transform timeouts.
4. Best practices and limitations at scale
Always pre-validate that both entitlement and contract records exist before running the relationship import — failed lookups will silently skip rows unless you add an onReject script
Add error logging in your Transform Map using ignore vs reject conditions so you can capture rows that failed to match
Index your staging table if you are doing high-volume imports — this reduces transform processing time significantly
Avoid running transforms during peak hours if your instance has high concurrent user load
Post-import validation: Spot-check 10–15 entitlement records and confirm the Contracts related list is populated. You can also run a quick query on the M2M table to count relationship records and cross-check against your import file row count
Limitation to be aware of: If the same entitlement-contract pair is imported twice, you may get duplicate M2M records unless your Transform Map includes a coalesce field to check for existing relationships before inserting
If this helps, pls click on helpful and accept solution.
Best Regards,
Bharat Chavan