ServiceNow created 2 records via inbound actions with same record number but different sys_ids

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 09:56 AM
I created a inbound actions which should create new record in ServiceNow based on certain conditions. The " When to Run " type is selected as "None". So use case is like if someone sends a reply/fwd email as well to SN , then also it should create new record.
Issue is when I'm sending a new email, its working fine. But If I'm sending reply on the same email its creating new record with different sys_id however the record number remains the same. So as per my customizations it should create new record always (If Record number i not mentioned in email subject line) with unique record number.
To be noted there is a time gap between both the emails received in SNOW.
Example : For both cases CASE000xxxx11 is created with 2 different sys_ids.
Need inputs if there is gap at my end or need to take help of ServiceNow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 10:33 AM
You can try what this user did, https://www.servicenow.com/community/developer-forum/inbound-action-type-quot-reply-quot-to-always-c...
He added current.initialize() to the top of his script. Not sure if it will work but definitely worth a try.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 10:40 AM
but this issue is occurring only if I send reply to the same email which I have already send as New email for record creation. However same issue is not observed If I'm sending reply email to a new email which doesn't exists in SNOW. This is my observations from email Log.So somehow its identifying the mail trail already there in SN and still creating Case with same case number but different ID. So my question is can it be handled so that it create new case records only.
Received id=<abc@cde.xxxx.PROD.OUTLOOK.COM> Classified as reply to 'CASE000287961' found via In-Reply-To header
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 10:49 AM - edited 11-16-2022 10:50 AM
See this for how inbound actions are processed.
Yes, it identifies email threads by matching the In-Reply-To: header to the Message ID of previous emails.
Your best bet might be to initiate a new gliderecord, rather than using the current object.
Example:
var gr = new GlideRecord('yourTableName');
gr.initialize();
gr.account = userAccount;
gr.contact =contactSysId;
gr.insert();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 08:26 PM
I will try and let you know. Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 08:49 PM
No. Using GlideRecord isn't working in this scenario. Record itself is not getting created.