---
sourceDocument: Xanadu ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/servicenow-platform

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Generate an assessment with the on-demand API

# Generate an assessment with the on-demand API {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The Assign Assessment buttons call an API to generate on-demand
assessments.

## Before you begin

Role required: assessment_admin or admin

## About this task

## Procedure

1. To generate an assessment, call the [AssessmentCreation
   API](https://www.servicenow.com/docs/access?context=c_AssessmentCreation&version=xanadu&pubname=xanadu-api-reference&ft:locale=en-US) from any script in the system, such as a business rule or client script.
2. Use the sys_ids of these items:  
   * An assessable record to evaluate. The assessable record must be associated with an on-demand type and at least one category that contains non-scripted metrics.
   * One or more users who should perform the assessment. The API generates a questionnaire about the specified assessable record for each user.
   {#t_GenAssessmentOnDemandAPI__ul_unq_4ws_2r}
**Related concepts**   

* [Assessment generation](https://servicenow-prod.fluidtopics.net/oWmzBlaoFYLkPk3uPPnuvg "In the Assessments application, administrators or assessment administrators can trigger the system to generate scheduled assessments or on-demand assessments when all the prerequisite steps are completed.")
* [Scheduled assessments](https://servicenow-prod.fluidtopics.net/5A1VO3c5FtEO5jvxMfrjew "The system generates a unique scheduled job for each metric type with the Schedule type field set to Scheduled.")
* [Assessment instances](https://servicenow-prod.fluidtopics.net/pd1x9eOFwpxOWAVqaXvvSA "An assessment instance represents one occurrence of a questionnaire assigned to one user.")  
**Related tasks**   

* [Generate a scheduled assessment manually](https://servicenow-prod.fluidtopics.net/vL2iNFsztfxYR6myqb1hyw "Administrators can generate scheduled assessments manually.")
* [Generate a vendor type assessment manually](https://servicenow-prod.fluidtopics.net/4HBXWrJVAdpS4M7Ieegpwg "The Vendor Performance feature provides a direct method of generating assessments for the Vendor metric type.")
* [Set an assessment generation schedule](https://servicenow-prod.fluidtopics.net/4YQ1yecBPTD2vSbT8oeEHw "You can set assessment generation schedules. You must set a schedule for each metric type individually.")
* [View an assessment instance](https://servicenow-prod.fluidtopics.net/BlCGRkUNXAlHsXOW~1QVOQ "An assessment instance represents one occurrence of a questionnaire assigned to one user.")
* [Clean up assessment data](https://servicenow-prod.fluidtopics.net/UWwb6MnplddRDd3FYeGc1A "The assessment process generates a considerable amount of data, some of which is not useful after a short time.")

