Auto populate contact_type

radhamanchi
Tera Contributor
The user submitted an incident where the mandatory fields were not filled. Within 7 seconds, a second incident was automatically created with complete and correct details. It was observed that in the first incident, the Contact Type field did not auto‑populate as expected and was left blank. For every incident contact type should auto populate but here it is not populated.
4 REPLIES 4

SumanthDosapati
Mega Sage

@radhamanchi 

What is the source for your incident creation? Is it directly from incident form? or record producer? or email?
We have to set the contact type in the configuration for each source. 

For example, for inbound emails, you have to set the contact type to email in your inbound email scripts.

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth

subhamsni92
Giga Contributor

This typically indicates that two different processes are involved in incident creation.

The first incident (with missing mandatory fields and blank Contact Type) is likely being created outside the normal UI flow—for example via:

  • Integration / API

  • Background script

  • Import set

Such methods bypass client-side logic (like default values, UI policies, or client scripts), which is why Contact Type did not auto-populate.

The second incident created after a few seconds is likely from:

  • A Business Rule / Flow Designer / Integration retry

  • Or a correction mechanism that creates a proper record with all required fields

So what’s happening is:

  • First record → created without proper validation (bypassed UI logic)

  • Second record → created by a process that enforces correct data

Why Contact Type is blank?
Because auto-population is probably handled via:

  • Client Script or UI Policy (runs only on form)
    and not via server-side logic

Fix:
Move the Contact Type defaulting logic to:

  • Business Rule (before insert)
    or

  • Data Policy

so it works for all entry points (UI + API + integrations).

Hope this helps! If it did, please mark it as helpful 🙂

Ankur Bawiskar
Tera Patron

@radhamanchi 

then on your record producer form from where user is submitting incident there you should ask for mandatory fields so that you can map against the target fields

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Tanushree Maiti
Kilo Patron

Hi @radhamanchi 

 

Check this KB0824024 Incidents created without filling out mandatory fields 

 

Are you sure user is waiting on that incident for 7 seconds only. because this kind of scenario typically occurs when a session times out or a server-side script bypasses client-side validations.

 

Probable Solution could be - Implement Data Policies instead of just UI Policies, as Data Policies enforce mandatories at the server level regardless of the user's session state.

 

 

 

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: