--- name: contract-obligation-extraction title: Contract Obligation Extraction description: Extract obligations from contract documents including deadlines, deliverables, payment terms, SLA commitments, and termination conditions with compliance tracking author: Happy-Technologies-LLC author_url: https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/legal/contract-obligation-extraction license: Apache-2.0 version: 0.1.1 execution_mode: open jurisdiction: general practice: contracts language: en tags: - legal - contract - obligation - extraction - compliance - tracking - deadlines - legal-service-delivery --- # Contract Obligation Extraction ## Overview This skill provides a structured approach to extracting and tracking contractual obligations in ServiceNow Legal Service Delivery. It helps you: - Parse contract documents from `ast_contract` and linked `sys_attachment` records to identify all binding obligations - Categorize obligations by type: deliverables, payment terms, SLA commitments, reporting requirements, termination conditions, and compliance mandates - Extract specific deadlines, milestones, and recurring obligation schedules - Create trackable legal tasks in `sn_legal_task` for each obligation with due dates and owners - Build an obligation register for portfolio-wide compliance monitoring - Monitor obligation compliance status and generate variance reports **When to use:** After contract execution to set up obligation tracking, during contract audits to verify compliance, when onboarding a new vendor relationship, or when preparing for contract renewal negotiations. **Plugin required:** `com.sn_legal_service_delivery` ## Prerequisites - **Roles:** `sn_legal_case_user`, `sn_legal_case_manager`, `contract_manager`, or `sn_legal_admin` - **Access:** Read/write access to `ast_contract`, `sn_legal_task`, `sn_legal_case`, and `sys_attachment` tables - **Knowledge:** Understanding of contract structures, obligation types, and your organization's compliance tracking requirements - **Plugin:** Legal Service Delivery (`com.sn_legal_service_delivery`) must be activated ## Procedure ### Step 1: Retrieve the Contract Record and Documents Fetch the contract metadata and associated document attachments. **Using MCP (Claude Code/Desktop):** ``` Tool: SN-Get-Record Parameters: table_name: ast_contract sys_id: [contract_sys_id] fields: sys_id,number,short_description,contract_type,vendor,starts,ends,renewal_date,payment_amount,payment_terms,total_cost,state,terms_and_conditions,auto_renew,notice_period,assigned_to,department ``` Retrieve attachments: ``` Tool: SN-Query-Table Parameters: table_name: sys_attachment query: table_name=ast_contract^table_sys_id=[contract_sys_id] fields: sys_id,file_name,content_type,size_bytes,sys_created_on limit: 20 order_by: sys_created_on ``` **Using REST API:** ```bash # Get contract record GET /api/now/table/ast_contract/[contract_sys_id]?sysparm_fields=sys_id,number,short_description,contract_type,vendor,starts,ends,renewal_date,payment_amount,payment_terms,total_cost,state,terms_and_conditions,auto_renew,notice_period,assigned_to,department&sysparm_display_value=true # Get attachments GET /api/now/table/sys_attachment?sysparm_query=table_name=ast_contract^table_sys_id=[contract_sys_id]&sysparm_fields=sys_id,file_name,content_type,size_bytes,sys_created_on&sysparm_limit=20 # Download contract document GET /api/now/attachment/[attachment_sys_id]/file ``` ### Step 2: Retrieve Existing Terms and Conditions If Contract Lifecycle Management is active, query linked terms. **Using MCP:** ``` Tool: SN-Query-Table Parameters: table_name: clm_m2m_contract_and_terms query: contract=[contract_sys_id] fields: sys_id,contract,terms_and_conditions,state limit: 50 ``` Then retrieve the term details: ``` Tool: SN-Query-Table Parameters: table_name: clm_terms_and_conditions query: sys_idIN[terms_sys_ids] fields: sys_id,name,description,category,obligation_type,obligation_owner,due_date,frequency,status limit: 50 ``` **Using REST API:** ```bash GET /api/now/table/clm_m2m_contract_and_terms?sysparm_query=contract=[contract_sys_id]&sysparm_fields=sys_id,contract,terms_and_conditions,state&sysparm_limit=50 GET /api/now/table/clm_terms_and_conditions?sysparm_query=sys_idIN[terms_sys_ids]&sysparm_fields=sys_id,name,description,category,obligation_type,obligation_owner,due_date,frequency,status&sysparm_limit=50&sysparm_display_value=true ``` ### Step 3: Extract Obligations by Category Parse the contract text and categorize each obligation: #### 3a. Payment Obligations | Field | What to Extract | Example | |-------|----------------|---------| | Amount | Dollar value per payment | $25,000/month | | Frequency | Payment schedule | Monthly, quarterly, annual | | Net Terms | Days until payment due | Net 30, Net 45, Net 60 | | Late Fees | Penalty for late payment | 1.5% per month on overdue | | Escalation | Annual price increase | 3% annual escalation | | True-up | Usage reconciliation | Quarterly true-up for overages | | Milestone Payments | Deliverable-triggered | 30% at kickoff, 40% at UAT, 30% at go-live | #### 3b. Deliverable Obligations | Field | What to Extract | Example | |-------|----------------|---------| | Deliverable | What must be provided | Monthly security audit report | | Owner | Party responsible | Vendor / Client | | Due Date | When due | 15th of each month | | Acceptance Criteria | How measured | Per Exhibit B specifications | | Cure Period | Time to fix deficiencies | 10 business days | #### 3c. SLA Commitments | Field | What to Extract | Example | |-------|----------------|---------| | Metric | SLA measurement | System uptime | | Target | Required level | 99.95% monthly | | Measurement Period | Window | Calendar month | | Credit | Remedy for miss | 5% credit per 0.1% below target | | Exclusions | What is excluded | Scheduled maintenance windows | | Chronic Failure | Repeated misses | 3 consecutive misses = termination right | #### 3d. Compliance and Reporting | Field | What to Extract | Example | |-------|----------------|---------| | Report | Required reporting | SOC 2 Type II audit report | | Frequency | How often | Annually | | Deadline | When due | Within 90 days of audit period end | | Certification | Required certs | ISO 27001, SOC 2, HITRUST | | Data Handling | Privacy requirements | GDPR DPA, data residency in EU | | Breach Notification | Incident reporting | Within 72 hours of discovery | #### 3e. Termination Conditions | Field | What to Extract | Example | |-------|----------------|---------| | For Cause | Triggers | Material breach uncured after 30 days | | For Convenience | Notice required | 90 days written notice | | Wind-down | Transition period | 6-month transition assistance | | Data Return | Post-termination | Return all data within 30 days | | Survival | Surviving clauses | Sections 7, 8, 12, 15 survive | ### Step 4: Create an Obligation Register Build a consolidated obligation register by creating legal tasks for each extracted obligation. **Using MCP:** ``` Tool: SN-Create-Record Parameters: table_name: sn_legal_task fields: short_description: "Payment obligation - Monthly license fee $25,000" description: | Contract: [contract_number] Vendor: [vendor_name] Obligation Type: Payment Amount: $25,000 Frequency: Monthly Due: 1st of each month Net Terms: Net 30 Late Fee: 1.5% per month Contract Reference: Section 4.1 legal_case: [case_sys_id] priority: 3 task_type: obligation_tracking assigned_to: [finance_contact_sys_id] due_date: [next_payment_date] state: 1 ``` Repeat for each obligation category. Example for SLA tracking: ``` Tool: SN-Create-Record Parameters: table_name: sn_legal_task fields: short_description: "SLA monitoring - 99.95% uptime commitment" description: | Contract: [contract_number] Vendor: [vendor_name] Obligation Type: SLA Metric: System uptime Target: 99.95% monthly Credit: 5% per 0.1% below target Chronic Failure: 3 consecutive misses triggers termination right Contract Reference: Exhibit C, Section 2.1 legal_case: [case_sys_id] priority: 2 task_type: obligation_tracking assigned_to: [service_manager_sys_id] due_date: [month_end_date] state: 1 ``` **Using REST API:** ```bash POST /api/now/table/sn_legal_task Content-Type: application/json { "short_description": "Payment obligation - Monthly license fee $25,000", "description": "Contract: CON0045678\nObligation Type: Payment\nAmount: $25,000\nFrequency: Monthly\nDue: 1st of each month\nNet Terms: Net 30", "legal_case": "[case_sys_id]", "priority": "3", "task_type": "obligation_tracking", "assigned_to": "[finance_contact_sys_id]", "due_date": "[next_payment_date]", "state": "1" } ``` ### Step 5: Set Up Obligation Compliance Monitoring Query existing obligation tasks to track compliance status. **Using MCP:** ``` Tool: SN-Query-Table Parameters: table_name: sn_legal_task query: legal_case.legal_matter=[matter_sys_id]^task_type=obligation_tracking fields: sys_id,number,short_description,state,due_date,assigned_to,priority,work_notes limit: 100 order_by: due_date ``` **Using REST API:** ```bash GET /api/now/table/sn_legal_task?sysparm_query=legal_case.legal_matter=[matter_sys_id]^task_type=obligation_tracking^ORDERBYdue_date&sysparm_fields=sys_id,number,short_description,state,due_date,assigned_to,priority,work_notes&sysparm_limit=100&sysparm_display_value=true ``` Monitor overdue obligations: ``` Tool: SN-Query-Table Parameters: table_name: sn_legal_task query: task_type=obligation_tracking^due_date