Skip to content

Commit 533d8ce

Browse files
committed
docs: add comprehensive incident ticketing integration documentation
- Add detailed ticketing integration guide covering special enrichment fields (ticket_url, ticket_id) - Document incident form schema system for extensible incident creation forms - Include API endpoints, permissions, and security considerations - Provide complete workflow examples for Jira, ServiceNow, and multi-system integrations - Add form schema design best practices and troubleshooting guidance - Update incidents navigation to include ticketing integration documentation - Add ticketing integration reference to incidents overview
1 parent 9d8b918 commit 533d8ce

File tree

3 files changed

+317
-1
lines changed

3 files changed

+317
-1
lines changed

docs/incidents/overview.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ Displays a detailed list of alerts contributing to the incident, with metadata f
9797
### (21) Incident Alert Link
9898
Provides quick access to the original monitoring tool for a specific alert.
9999

100+
### Incident Ticketing Integration
101+
Keep seamlessly integrates with external ticketing systems through special enrichment fields (`ticket_url` and `ticket_id`) and customizable incident form schemas. This enables automatic ticket creation, direct navigation to external systems, and structured data collection during incident creation. See [Ticketing Integration](/incidents/ticketing-integration) for detailed implementation guidance.
102+
100103
### (22) Incident Alert Status
101104
Shows the current status of each alert, such as acknowledged, resolved, or firing.
102105

Lines changed: 313 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
---
2+
title: "Incident Ticketing Integration"
3+
description: "Seamlessly integrate incident management with external ticketing systems through enrichments and custom forms"
4+
---
5+
6+
Keep's incident ticketing integration provides a powerful way to bridge your incident management workflow with external ticketing systems like Jira, ServiceNow, Linear, and others. This integration works through two key mechanisms: **ticket enrichments** and **incident form schemas**.
7+
8+
## Ticket Enrichments
9+
10+
### Special Enrichment Fields
11+
12+
Keep recognizes two special enrichment fields that enable automatic ticket linking in the UI:
13+
14+
- **`ticket_url`**: The direct URL to the ticket in your external system
15+
- **`ticket_id`**: The unique identifier of the ticket (e.g., JIRA-123, INC0001234)
16+
17+
When these enrichments are present on an incident, Keep automatically displays:
18+
- A clickable ticket link in the incidents table
19+
- Direct navigation to the external ticketing system
20+
- Visual indicators showing which incidents have associated tickets
21+
22+
### How Ticket Enrichments Work
23+
24+
Ticket enrichments can be added to incidents through several methods:
25+
26+
1. **Workflow Automation**: Automatically create tickets and add enrichments when incidents are created
27+
2. **Manual Enrichment**: Add ticket information manually through the UI
28+
3. **API Integration**: Use Keep's API to programmatically add ticket enrichments
29+
4. **Form Schema**: Collect ticket information during incident creation
30+
31+
## Incident Form Schemas
32+
33+
### Overview
34+
35+
Incident Form Schemas provide a flexible way to collect additional information during incident creation. These custom forms are tenant-specific and allow you to:
36+
37+
- Define custom fields for incident creation
38+
- Collect structured data that becomes incident enrichments
39+
- Integrate with ticketing workflows
40+
- Standardize incident information across your organization
41+
42+
### Creating Form Schemas
43+
44+
Form schemas are defined through Keep's API and can include various field types:
45+
46+
#### Supported Field Types
47+
48+
- **Text**: Single-line text input
49+
- **Textarea**: Multi-line text input
50+
- **Select**: Dropdown with predefined options
51+
- **Radio**: Radio button selection
52+
- **Checkbox**: Boolean checkbox
53+
- **Number**: Numeric input with optional min/max values
54+
- **Date**: Date picker input
55+
56+
#### Example Form Schema
57+
58+
```json
59+
{
60+
"name": "Production Incident Form",
61+
"description": "Standard form for production incidents with Jira integration",
62+
"fields": [
63+
{
64+
"name": "jira_project",
65+
"label": "Jira Project",
66+
"type": "select",
67+
"description": "Target Jira project for ticket creation",
68+
"required": true,
69+
"options": ["PROD", "OPS", "SUPPORT", "INFRA"],
70+
"default_value": "PROD"
71+
},
72+
{
73+
"name": "priority",
74+
"label": "Priority Level",
75+
"type": "select",
76+
"options": ["Critical", "High", "Medium", "Low"],
77+
"default_value": "Medium"
78+
},
79+
{
80+
"name": "business_impact",
81+
"label": "Business Impact",
82+
"type": "textarea",
83+
"placeholder": "Describe the business impact...",
84+
"max_length": 1000
85+
},
86+
{
87+
"name": "requires_immediate_attention",
88+
"label": "Urgent Issue",
89+
"type": "checkbox",
90+
"description": "Requires immediate escalation",
91+
"default_value": false
92+
},
93+
{
94+
"name": "estimated_users_affected",
95+
"label": "Estimated Users Affected",
96+
"type": "number",
97+
"min_value": 0,
98+
"max_value": 1000000
99+
}
100+
],
101+
"is_active": true
102+
}
103+
```
104+
105+
### API Endpoints
106+
107+
#### Get Form Schema
108+
```bash
109+
GET /incidents/form-schema
110+
```
111+
112+
Retrieves the current incident form schema for the tenant. Returns `null` if no schema is configured.
113+
114+
#### Create or Update Form Schema
115+
```bash
116+
POST /incidents/form-schema
117+
Content-Type: application/json
118+
119+
{
120+
"name": "My Incident Form",
121+
"description": "Custom incident creation form",
122+
"fields": [...],
123+
"is_active": true
124+
}
125+
```
126+
127+
#### Delete Form Schema
128+
```bash
129+
DELETE /incidents/form-schema
130+
```
131+
132+
Removes the incident form schema for the tenant.
133+
134+
### Permissions
135+
136+
Form schema operations require specific permissions:
137+
- **`read:incidents-form-schema`**: View form schemas
138+
- **`write:incidents-form-schema`**: Create/update form schemas
139+
- **`delete:incidents-form-schema`**: Delete form schemas
140+
141+
### Data Flow
142+
143+
1. **Form Definition**: Admin creates form schema with custom fields
144+
2. **Incident Creation**: User fills out form during incident creation
145+
3. **Enrichment Storage**: Form data is stored as incident enrichments
146+
4. **Workflow Integration**: Workflows can access form data for ticket creation
147+
148+
## Integration Workflows
149+
150+
### Automatic Ticket Creation
151+
152+
Here's an example workflow that automatically creates Jira tickets based on form data:
153+
154+
```yaml
155+
workflow:
156+
id: create-jira-ticket-from-form
157+
description: Create Jira ticket when incident is created with form data
158+
triggers:
159+
- type: incident
160+
filters:
161+
- key: "jira_project"
162+
value: ".*" # Any value indicates form was filled
163+
actions:
164+
- name: create-jira-ticket
165+
provider:
166+
type: jira
167+
with:
168+
url: "{{ providers.jira.url }}"
169+
username: "{{ providers.jira.username }}"
170+
password: "{{ providers.jira.password }}"
171+
project: "{{ incident.jira_project }}"
172+
issue_type: "Incident"
173+
summary: "{{ incident.name }}"
174+
description: |
175+
Incident: {{ incident.name }}
176+
Severity: {{ incident.severity }}
177+
Business Impact: {{ incident.business_impact }}
178+
Users Affected: {{ incident.estimated_users_affected }}
179+
180+
Created by Keep at {{ incident.created_at }}
181+
priority: "{{ incident.priority }}"
182+
- name: enrich-incident-with-ticket
183+
provider:
184+
type: keep
185+
with:
186+
enrichments:
187+
ticket_url: "{{ steps.create-jira-ticket.ticket_url }}"
188+
ticket_id: "{{ steps.create-jira-ticket.ticket_key }}"
189+
```
190+
191+
### ServiceNow Integration
192+
193+
```yaml
194+
workflow:
195+
id: create-servicenow-incident
196+
description: Create ServiceNow incident with form data
197+
triggers:
198+
- type: incident
199+
filters:
200+
- key: "requires_immediate_attention"
201+
value: true
202+
actions:
203+
- name: create-servicenow-incident
204+
provider:
205+
type: service-now
206+
with:
207+
instance: "{{ providers.servicenow.instance }}"
208+
username: "{{ providers.servicenow.username }}"
209+
password: "{{ providers.servicenow.password }}"
210+
table: "incident"
211+
short_description: "{{ incident.name }}"
212+
description: "{{ incident.business_impact }}"
213+
urgency: "1" # High urgency for immediate attention
214+
impact: "{{ incident.priority }}"
215+
- name: enrich-with-servicenow-ticket
216+
provider:
217+
type: keep
218+
with:
219+
enrichments:
220+
ticket_url: "{{ steps.create-servicenow-incident.ticket_url }}"
221+
ticket_id: "{{ steps.create-servicenow-incident.sys_id }}"
222+
```
223+
224+
## UI Integration
225+
226+
### Incidents Table
227+
228+
When incidents have ticket enrichments, the incidents table displays:
229+
- **Ticket Link Column**: Clickable links to external tickets
230+
- **Ticket ID Badge**: Visual indicator of ticket association
231+
- **Quick Actions**: Direct navigation to ticketing system
232+
233+
### Incident Details
234+
235+
In the incident details view:
236+
- **Ticket Information Panel**: Shows linked ticket details
237+
- **Form Data Display**: All form-submitted data appears as enrichments
238+
- **Action Buttons**: Quick links to ticket management actions
239+
240+
### Form Rendering
241+
242+
The incident creation form automatically renders based on the configured schema:
243+
- **Field Validation**: Client-side and server-side validation
244+
- **Conditional Fields**: Dynamic field display based on selections
245+
- **Data Persistence**: Form data persists as incident enrichments
246+
247+
## Best Practices
248+
249+
### Form Schema Design
250+
251+
1. **Keep Forms Focused**: Include only essential fields for your workflow
252+
2. **Use Clear Labels**: Make field purposes obvious to users
253+
3. **Provide Defaults**: Set sensible default values to speed up form completion
254+
4. **Validate Input**: Use field constraints to ensure data quality
255+
5. **Group Related Fields**: Organize fields logically for better UX
256+
257+
### Enrichment Naming
258+
259+
1. **Use Consistent Naming**: Establish naming conventions for enrichment keys
260+
2. **Include Context**: Prefix fields with system names (e.g., `jira_project`, `snow_priority`)
261+
3. **Reserve Special Fields**: Only use `ticket_url` and `ticket_id` for actual ticket links
262+
263+
### Workflow Integration
264+
265+
1. **Handle Missing Data**: Check for field existence before using in workflows
266+
2. **Provide Fallbacks**: Have default behavior when form data is incomplete
267+
3. **Update Tickets**: Keep ticket information synchronized with incident updates
268+
4. **Error Handling**: Gracefully handle ticket creation failures
269+
270+
## Troubleshooting
271+
272+
### Common Issues
273+
274+
**Form Schema Not Appearing**
275+
- Verify form schema is active (`is_active: true`)
276+
- Check user permissions for form schema access
277+
- Ensure schema is properly saved via API
278+
279+
**Ticket Links Not Showing**
280+
- Confirm `ticket_url` and `ticket_id` enrichments are present
281+
- Verify enrichment values are valid URLs/IDs
282+
- Check incident table column configuration
283+
284+
**Workflow Not Triggering**
285+
- Validate workflow filters match form field names exactly
286+
- Ensure incident has required enrichments from form
287+
- Check workflow permissions and provider configurations
288+
289+
### API Debugging
290+
291+
Enable debug logging to troubleshoot form schema and enrichment issues:
292+
293+
```bash
294+
# Check form schema
295+
curl -H "Authorization: Bearer $TOKEN" \
296+
"$KEEP_URL/incidents/form-schema"
297+
298+
# Verify enrichments on incident
299+
curl -H "Authorization: Bearer $TOKEN" \
300+
"$KEEP_URL/incidents/$INCIDENT_ID"
301+
302+
# Test workflow execution
303+
curl -H "Authorization: Bearer $TOKEN" \
304+
"$KEEP_URL/workflows/runs?incident_id=$INCIDENT_ID"
305+
```
306+
307+
## Security Considerations
308+
309+
- **Input Validation**: All form inputs are validated server-side
310+
- **XSS Prevention**: Form data is sanitized before display
311+
- **Permission Checks**: Schema operations require appropriate permissions
312+
- **Data Encryption**: Sensitive form data follows Keep's encryption standards
313+
- **Audit Logging**: All form schema changes are logged for compliance

docs/mint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
},
9191
{
9292
"group": "Incidents",
93-
"pages": ["incidents/overview", "incidents/facets"]
93+
"pages": ["incidents/overview", "incidents/ticketing-integration", "incidents/facets"]
9494
},
9595
{
9696
"group": "Workflow Automation",

0 commit comments

Comments
 (0)