---
original_url: "https://jace.pro/blog/extension-points/"
format: markdown
ai_optimized: true
---

Extension Points- # Extension Points

June 6, 2022 [servicenow](/tags/servicenow/)

  Enable AI Animation[https://developer.servicenow.com/connect.do#!/event/knowledge19/CCW1630](https://developer.servicenow.com/connect.do#!/event/knowledge19/CCW1630)

Post about extension points…

Mhz matt a great tldr about this.

mhz
TIL: How scripted extension points work.
BENEFIT: You can define a script include where the same methods have different implementations for different circumstances.

OVERVIEW:

In the [sys_extension_point] table, define a script include to serve as interface definition (method signatures and their return types).
- On the record you made in step #1, use “Create Implementation” button to generate a copy of the interface script include, then edit the generated file to handle a specific circumstance.
you can do this multiple times to create alternate versions of the script include with same method names but different implementations.
each include has a boolean method which can tell if its applicable to the current situation.
Its “handles()” method, can initialize internal variables if needed, then returns a boolean to the caller, true if it applies or false means to ignore it.
Example: handles: function() { return record.type==“incident” };
- Create a wrapper script to call the implemented script include(s)
wrapper asks for a list of the “extensions” for a script include name
loops thru each “extension” calling the boolean “handles()” method, followed by other desired method if handles() returns true.
USE CASE: There are many use cases but the one I’m envisioning is when there are multiple different customer integrations for the same table, each with different rules.
DISCLAIMER: I’m basing this on studying work of others. I haven’t built it myself yet. (edited)

---
[View this page on GitHub](https://github.com/jacebenson/jace.pro/tree/main/./src/posts/2022/2022-06-06-extension-points.md).

[Extension Points](https://jace.pro/blog/extension-points/) [Jace Benson](https://jace.pro) ![Jace Benson](https://jace.pro/icon-512x512.png)

---

*This content is from Jace Benson's ServiceNow and tech blog at jace.pro*
*Original post: https://jace.pro/blog/extension-points/*
