---
sourceDocument: Australia Enterprise Architecture (formerly Application Portfolio Management)
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/application-portfolio-management

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Enterprise Architecture (formerly Application Portfolio Management)

ft:clusterId :

    - appportman

bundleId :

    - appportman

workflow :

    - Technology


---

# Configure script to customize risk calculation

# Configure script to customize risk calculation {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Configure the risk calculation script at the extension points where the risks bubble
up to the next level. With such configuration, the risk engine ignores the default logic of
risk calculation and looks for the custom logic.

## Antes de Iniciar

Role required: script_include_admin

## Por Que e Quando Desempenhar Esta Tarefa

There are three API extension points, at which the risks bubble up to the next level
based on the script.

You can configure the script at the following levels:

* sn_apm.productModelCustomRiskCalculation -- Product model (hardware and software models) risk level from the risks parameters level: The level at which the risks bubble up from the risks parameters level to the product model risk level.
* sn_apm.AppBusinessServicesCustomRiskCalculation -- Application service risk level from the product models risk level: The level at which the risks bubble up from the product model risk level to the application service risk level.
* sn_apm.BusinessApplicationCustomRiskCalculation -- Business application risk level from the application service risk level: The level at which the risks bubble up from the application service risk level to the business application risk level.
{#configure-risk-bubble__ul_p4x_t5g_5jb}

## Procedimento

1. Navigate to AllSystem Extension PointsScripted Extension Points.
2. Filter Application Portfolio Management applications in the Application column.
3. Click the API Name.
4. Scroll down to the Implementations section and click the extension point.
5. Click the preview this record icon (![Information icon]()) next to the Class field.
6. In the Script Include pop-up, click Open Record button.  
   By default, the sys_id of the function returns False
   for each of the API name and the risk engine follows the APM logic in
   calculating the risk.  
   Figura 1. Configure custom script to calculate risks, for example, sn_apm.AppBusinessServicesCustomRiskCalculation
7. Configure the function to return True based on the sys_id of the API at the product model level, application service level, or business application level.  
   The risk engine then calls the API for the custom logic and calculates the
   risk in line with this logic, which bubbles up to the next level of risk
   calculation.
8. Click Update.

