- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 07:14 AM
Hi All,
As one of our third-party systems needs us to pass UUID in the integration API call. Is the way to convert GUID to UUID format?
They are not accepting GUID format. Could you please help on it?
Thanks,
Gowri
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 09:59 AM
You may try like this.
var uuid = "18d874986a114520bd29466a446a50eb";
uuid = uuid.replace(/^([a-f0-9]{8})([a-f0-9]{4})([a-f0-9]{4})([a-f0-9]{4})([a-f0-9]{12})$/i, "$1-$2-$3-$4-$5");
gs.print(uuid);
Also, we have VMUtils OOTB functions to convert UUID to CorrelationID and vice-versa.
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 11:46 AM
Hi, I would not expect a records unique identifier to be the same in both platforms\solutions and in your scenario would normally use an 'external identifier' field on the integrated table which would hold the vendors UUID. This field would then be mapped to sys_id during import/transform, meaning that it would be available to be passed to the vendor instead of the sys_id in any outbound payload.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 09:28 AM
Thanks Tony, but the third party system, expect us to generate uuid for each outbound api call from our system and sent in the payload, to identify unique transaction.
So it there method to generate uuid or convert guid for servicenow?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 09:59 AM
You may try like this.
var uuid = "18d874986a114520bd29466a446a50eb";
uuid = uuid.replace(/^([a-f0-9]{8})([a-f0-9]{4})([a-f0-9]{4})([a-f0-9]{4})([a-f0-9]{12})$/i, "$1-$2-$3-$4-$5");
gs.print(uuid);
Also, we have VMUtils OOTB functions to convert UUID to CorrelationID and vice-versa.
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 12:19 AM
Thanks Narsing, your solution helped 😊