{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":600,"path":"api-reference/scripts/c_Processors.md","title":"Processors","bundle":null,"doc_type":null,"release":"australia","body":"\n# Processors\n\nProcessors provide a customizable URL endpoint that can execute arbitrary server-side JavaScript code and produce output such as TEXT or JSON. Creating custom processors is deprecated.\n\n**Note:** This feature is deprecated. While legacy, existing custom processors continue to be supported, creating new custom processors has been deprecated. Instead, use the [Scripted REST APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n**Warning:** When creating a processor, ensure that you use parameter names that are specific to your processor. For example, if your processor exports a list of legal records, and a necessary parameter is the recipient's email address, don't use “email” as the parameter name. Create a more processor specific parameter name, such as legal\\_export\\_recipient\\_email. Failure to do so, and using instance parameter names, such as id, table, sys\\_id, service, catalog\\_id, or view \\(and others\\), can cause unexpected results.\n\n## When to create processors\n\nDo not create custom processors. This feature is deprecated. Please use the REST APIs instead of creating custom processors. The remaining information is left for existing processors only.\n\n## Processor form\n\n<table id=\"table_ck2_yr2_sr\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nUnique name of the processor.\n\n</td></tr><tr><td>\n\nType\n\n</td><td>\n\nProgramming language of the processor script.\n\n Options include:\n\n -   java: do not select this option\n-   script\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nApplication containing this record.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nFlag to enable or disable the record.\n\n</td></tr><tr><td>\n\nCSRF protect\n\n</td><td>\n\nOption to protect the processor from running unless the instance uses a CSRF token.\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nDescription of the processor's function or purpose.\n\n</td></tr><tr><td>\n\nParameters\n\n</td><td>\n\nList of available input parameters.\n\n Specify parameter values in the URL as **&lt;parameter name&gt;=&lt;parameter value&gt;**.\n\n **Note:** Parameter names must be processor-specific. Do not choose common parameter names that another processor might use. If you use a common parameter name, such as `id`, `sys_id` or `table` in a processor, it can break other functionality, since the processor wins when that parameter exists in a URL. For example, a processor with an `id` parameter, regardless of the Path value in the same record, breaks the Service Portal, which depends on that parameter for page identification.\n\n</td></tr><tr><td>\n\nPath\n\n</td><td>\n\nURI path used to call this processor.\n\n Call a processor from the URL as:\n\n `https://<instance name>.service-now.com/<Path>.do`\n\n</td></tr><tr><td>\n\nScript\n\n</td><td>\n\nImmediately Invoked Function Expression to run when the system calls this processor.\n\n The function automatically provides input parameters for the following API objects.\n\n -   g\\_request\n-   g\\_response\n-   g\\_processor\n\n</td></tr><tr><td>\n\nProtection policy\n\n</td><td>\n\nPolicy to use to protect this record's script.\n\n Options include:\n\n -   None\n-   Read-only\n-   Protected\n\n</td></tr></tbody>\n</table>-   **[Processor API components](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/r_ProcessorAPIComponents.md)**  \nProcessors have access to dedicated API classes, objects, and methods.\n-   **[Secure and protect a processor](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/t_SecureAProcessor.md)**  \nYou can protect your processor against unauthorized use by using role restrictions, and protect it by requiring a CSRF token.\n-   **[Create a simple processor](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/t_CreateSimpleProcessor.md)**  \nCreate a simple processor to execute a script from a URL query. This feature is deprecated.\n-   **[Create a multi-table processor](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/t_CreateMultiTableProcessor.md)**  \nCreate a multi-table processor that reports the number of rows in any table on your instance. This feature is deprecated.\n-   **[Create a custom processor](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/t_CreatingACustomProcessor.md)**  \nCreate a custom processor to execute a script from a URL query. This feature is deprecated.\n\n**Parent Topic:**[Server-side scripting](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_ServerScripting.md)\n\n"}}