{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":19816,"path":"impact/custom-payload-help-guide-impact.md","title":"Custom payload in alerts integration","bundle":null,"doc_type":null,"release":"australia","body":"\n# Custom payload in alerts integration\n\nInstance Observer integrations enable you to define and manage custom JSON request payload for ServiceNow and third-party integrations.\n\nYou can now include additional fields in notification payloads, exclude specific data that is not required by the target system, format the payload to align with specific third-party API requirements or internal business logic, eliminating the need for complex scripted REST APIs on the customer side.\n\n-   Use either the default payload or customize it to include additional data as needed.\n-   Modify the default payload, if needed, which is displayed in the Editor window on the left.\n-   Modify either the key or the value, or both as each parameter consists of a key and a value.\n-   The Preview section on the right displays the expected JSON payload after rendering.\n-   If the JSON is invalid, errors are highlighted, and the option to save is disabled.\n\n## Default mustache payload template\n\n```\n{\n  \"alert_number\": \"{{alert_number}}\",\n  \"alert_type\": \"{{alert_type}}\",\n  \"alert_name\": \"{{alert_name}}\",\n  \"alert_time\": \"{{alert_time}}\",\n  \"instance\": \"{{instance}}\",\n  \"description\": \"{{description}}\",\n  \"alert_created\": \"{{alert_created}}\"\n}\n\n```\n\n\\[Omitted image \"io-default-mustache-payload.png\"\\] Alt text: Edit payload for default mustache payload template.\n\n## Example: Default Payload + Custom Parameters\n\n```\n{\n\"alert_number\": \"{{alert_number}}\",\n  \"alert_type\": \"{{alert_type}}\",\n  \"alert_name\": \"{{alert_name}}\",\n  \"alert_time\": \"{{alert_time}}\",\n  \"instance\": \"{{instance}}\",\n  \"description\": \"{{description}}\",\n  \"alert_created\": \"{{alert_created}}\",\n  \"Custom_message\": \"{{alert_name}}' of type {{alert_type}} generated for {{instance}} at {{alert_time}}. Please review.\",\n  \"Severity\": “High”\n}\n\n```\n\n\\[Omitted image \"io-default-payload-cust-param.png\"\\] Alt text: Edit payload for default payload + custom parameters.\n\n## Custom parameters and limits\n\nThe **custom\\_parameter** field allows you to insert custom message into the JSON template, you can also use the existing parameters as shown in the custom parameter samples.\n\nThe limitations are:\n\n-   Required: At least one and at most 20 parameters to save the template.\n-   Maximum: 13 custom parameters.\n-   If exceeded, a warning appears: `Template must have at least one default key and up to 20 keys. Adjust or select 'Reset to Default' to apply defaults.`\n\n## Samples of custom parameters for syntax reference\n\n\"Information\": \"An alert \\{\\{alert\\_name\\}\\} has been triggered for \\{\\{instance\\}\\} at \\{\\{alert\\_time\\}\\} Description: \\{\\{description\\}\\}\"\n\n\"Alert\\_message\": \"New alert '\\{\\{alert\\_name\\}\\}' of type \\{\\{alert\\_type\\}\\} generated for \\{\\{instance\\}\\} at \\{\\{alert\\_time\\}\\}. Please review.\"\n\n\"Event\\_type\": \"Severity-High! An alert \\{\\{alert\\_name\\}\\} has been triggered for \\{\\{instance\\}\\} at \\{\\{alert\\_time\\}\\} Description: \\{\\{description\\}\\}\"\n\n## Third-party request body mapping\n\nSome third-party integrations require specific key names. You can modify the default payload to match their expected format.\n\nExample: Third-party request body:\n\n```\n{\n  \"endTime\": 1,\n  \"entitySelector\": \"string\",\n  \"eventType\": \"AVAILABILITY_EVENT\",\n  \"properties\": {},\n  \"startTime\": 1,\n  \"timeout\": 1,\n  \"title\": \"string\"\n}\n\n```\n\n## Modified IO payload to match third-party format\n\n\\[Omitted image \"io-modified-io-payload.png\"\\] Alt text: Modified IO payload to match third-party format.\n\n## Actions and validation\n\n-   **Revert Changes**\n\n    Restores the last saved content.\n\n-   **Reset to Default**\n\n    Resets the template to its default payload.\n\n-   **Syntax Validator**\n\n    Ensures JSON validity before saving. Errors prevent saving.\n\n-   **Test Integration**\n\n    Sends a sample notification to verify webhook integration.\n\n\n**Parent Topic:**[Use alerts to monitor your instance](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/impact/io-alerts-intro.md)\n\n"}}