- A
In the Scripted REST API, use a GlideRecord to query the incident table with a condition on the 'alert_id' field before inserting a new record; if a record exists, skip creation and return the existing record's sys_id
This is the simplest and most effective idempotency check within the same API script.
- B
Create a GlideAggregate script that counts incidents with the same 'alert_id'; proceed only if count is zero
Why wrong: GlideAggregate is for counting, but the race condition exists; also it's not atomic.
- C
Add a before-insert business rule on the incident table that checks for duplicates using the 'alert_id' field
Why wrong: Business rules run on all inserts, adding unnecessary overhead, and may still allow duplicates if concurrent.
- D
Use a flow in Flow Designer triggered by the REST API that creates an incident only if the 'alert_id' is not already present in a custom table
Why wrong: This adds complexity with a custom table; a simple GlideRecord check in the API is more efficient.
Quick Answer
The correct approach is to use a GlideRecord query on the incident table with a condition on the unique 'alert_id' field before inserting a new record, and if a match exists, skip creation and return the existing sys_id. This implements idempotency directly within the Scripted REST API by leveraging the unique identifier from the payload to check for duplicates, ensuring that retry mechanisms from the monitoring tool do not produce multiple incidents. On the ServiceNow Certified Application Developer CAD exam, this scenario tests your understanding of idempotency patterns in REST APIs and the practical use of GlideRecord for duplicate incident prevention—a common trap is assuming a database unique constraint alone suffices, but the exam emphasizes logic within the script itself. A helpful memory tip: “Query before you create, or you’ll duplicate your fate.”
SNOW-CAD Platform Features and Integration Practice Question
This SNOW-CAD practice question tests your understanding of platform features and integration. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
An organization has a ServiceNow instance that integrates with a third-party monitoring tool using a webhook. The monitoring tool sends HTTP POST requests to a Scripted REST API in ServiceNow to create incidents automatically. Recently, the monitoring tool started sending duplicate requests due to a retry mechanism. The developer wants to ensure that duplicate incidents are not created. The Scripted REST API currently creates a new incident record for every request without checking for duplicates. The request payload includes a unique 'alert_id' field. The developer decides to implement idempotency logic. Which approach should the developer use to prevent duplicate incident creation?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
In the Scripted REST API, use a GlideRecord to query the incident table with a condition on the 'alert_id' field before inserting a new record; if a record exists, skip creation and return the existing record's sys_id
Option A is correct because it implements idempotency directly within the Scripted REST API by querying the incident table using GlideRecord with a condition on the unique 'alert_id' field before inserting. If a record with that 'alert_id' already exists, the API skips creation and returns the existing sys_id, ensuring no duplicate incidents are created despite duplicate webhook requests.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
In the Scripted REST API, use a GlideRecord to query the incident table with a condition on the 'alert_id' field before inserting a new record; if a record exists, skip creation and return the existing record's sys_id
Why this is correct
This is the simplest and most effective idempotency check within the same API script.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Create a GlideAggregate script that counts incidents with the same 'alert_id'; proceed only if count is zero
Why it's wrong here
GlideAggregate is for counting, but the race condition exists; also it's not atomic.
- ✗
Add a before-insert business rule on the incident table that checks for duplicates using the 'alert_id' field
Why it's wrong here
Business rules run on all inserts, adding unnecessary overhead, and may still allow duplicates if concurrent.
- ✗
Use a flow in Flow Designer triggered by the REST API that creates an incident only if the 'alert_id' is not already present in a custom table
Why it's wrong here
This adds complexity with a custom table; a simple GlideRecord check in the API is more efficient.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may choose Option C (business rule) thinking it centralizes duplicate logic, but they overlook that the business rule runs after the insert attempt, not before the API call, so it cannot prevent the duplicate request from being processed or the API from returning a success response for the duplicate.
Detailed technical explanation
How to think about this question
Idempotency in REST APIs is typically achieved by checking a unique key (like 'alert_id') before performing a write operation. In ServiceNow, GlideRecord's get() method with an encoded query is the most efficient way to check for an existing record, as it leverages the database index on the 'alert_id' field. A subtle behavior to note: if the monitoring tool sends requests concurrently, a race condition could still occur; to fully prevent this, the developer could use a GlideRecord insert with a unique index constraint on the 'alert_id' column, causing the second insert to fail gracefully.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the SNOW-CAD exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Platform Features and Integration — study guide chapter
Learn the concepts, then practise the questions
- →
Platform Features and Integration practice questions
Targeted practice on this topic area only
- →
All SNOW-CAD questions
500 questions across all exam domains
- →
ServiceNow Certified Application Developer CAD study guide
Full concept coverage aligned to exam objectives
- →
SNOW-CAD practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related SNOW-CAD practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Working with Data practice questions
Practise SNOW-CAD questions linked to Working with Data.
Platform Features and Integration practice questions
Practise SNOW-CAD questions linked to Platform Features and Integration.
Integrating and managing application data practice questions
Practise SNOW-CAD questions linked to Integrating and managing application data.
Automating application logic with business rules and scripts practice questions
Practise SNOW-CAD questions linked to Automating application logic with business rules and scripts.
Application development using ServiceNow Studio practice questions
Practise SNOW-CAD questions linked to Application development using ServiceNow Studio.
Creating and customizing tables and data practice questions
Practise SNOW-CAD questions linked to Creating and customizing tables and data.
Designing interfaces and user experiences practice questions
Practise SNOW-CAD questions linked to Designing interfaces and user experiences.
Core Application Development practice questions
Practise SNOW-CAD questions linked to Core Application Development.
User Interface Development practice questions
Practise SNOW-CAD questions linked to User Interface Development.
SNOW-CAD fundamentals practice questions
Practise SNOW-CAD questions linked to SNOW-CAD fundamentals.
SNOW-CAD scenario practice questions
Practise SNOW-CAD questions linked to SNOW-CAD scenario.
SNOW-CAD troubleshooting practice questions
Practise SNOW-CAD questions linked to SNOW-CAD troubleshooting.
Practice this exam
Start a free SNOW-CAD practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this SNOW-CAD question test?
Platform Features and Integration — This question tests Platform Features and Integration — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: In the Scripted REST API, use a GlideRecord to query the incident table with a condition on the 'alert_id' field before inserting a new record; if a record exists, skip creation and return the existing record's sys_id — Option A is correct because it implements idempotency directly within the Scripted REST API by querying the incident table using GlideRecord with a condition on the unique 'alert_id' field before inserting. If a record with that 'alert_id' already exists, the API skips creation and returns the existing sys_id, ensuring no duplicate incidents are created despite duplicate webhook requests.
What should I do if I get this SNOW-CAD question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
This SNOW-CAD practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CAD exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.