RobotRock
Examples

Legal Document Review

Complete task payload from the RobotRock dashboard Examples gallery. Open Examples in your workspace to interact with the same task in the inbox UI.

Live inbox preview is not configured. Set NEXT_PUBLIC_APP_PREVIEW_URL to your dashboard URL (e.g. the app origin that serves /preview/examples/…).

Task

{
  "type": "legal-document-review",
  "name": "Legal Document Review",
  "description": "Review this legal document for compliance and risk assessment",
  "version": 2
}

Context

{
  "data": {
    "documentToReview": [
      {
        "name": "Legal Document",
        "url": "https://example.com/document.pdf"
      }
    ],
    "documentDetails": {
      "documentId": "LEGAL-2024-045",
      "submittedBy": "Procurement Team",
      "documentType": "Service Agreement",
      "counterparty": "Vendor Corp Inc.",
      "effectiveDate": "2024-06-01",
      "termLength": "24 months",
      "contractValue": 500000,
      "requiresLegalApproval": true
    },
    "riskAssessment": {
      "jurisdiction": "United States",
      "governingLaw": "California",
      "containsIpClause": true,
      "containsLiabilityCap": false
    }
  },
  "ui": {
    "documentToReview": {
      "ui:title": "Document to Review",
      "ui:widget": "attachments"
    },
    "documentDetails": {
      "ui:title": "Document Details",
      "ui:description": "Key information about the document",
      "items": {
        "documentId": {
          "ui:title": "Document ID"
        },
        "submittedBy": {
          "ui:title": "Submitted By"
        },
        "documentType": {
          "ui:title": "Document Type"
        },
        "effectiveDate": {
          "ui:title": "Effective Date"
        },
        "termLength": {
          "ui:title": "Term Length"
        },
        "contractValue": {
          "ui:title": "Contract Value",
          "ui:widget": "currency",
          "ui:options": {
            "currency": "USD"
          }
        },
        "requiresLegalApproval": {
          "ui:title": "Requires Legal Approval"
        }
      }
    },
    "riskAssessment": {
      "ui:title": "Risk Assessment",
      "ui:description": "Initial risk indicators",
      "items": {
        "governingLaw": {
          "ui:title": "Governing Law"
        },
        "containsIpClause": {
          "ui:title": "Contains IP Clause"
        },
        "containsLiabilityCap": {
          "ui:title": "Contains Liability Cap"
        }
      }
    }
  }
}

Actions

[
  {
    "title": "Approve Document",
    "description": "Approve this legal document",
    "id": "approve",
    "handlers": [
      {
        "type": "webhook",
        "url": "https://example.com/webhook",
        "headers": {}
      }
    ],
    "schema": {
      "type": "object",
      "required": [
        "risk-level"
      ],
      "properties": {
        "risk-level": {
          "type": "string",
          "title": "What is the overall risk level of this document?",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "enumNames": [
            "Low Risk",
            "Medium Risk",
            "High Risk",
            "Critical Risk"
          ]
        },
        "approval-notes": {
          "type": "string",
          "title": "Approval Notes"
        }
      }
    },
    "ui": {
      "risk-level": {
        "ui:widget": "radio"
      },
      "approval-notes": {
        "ui:widget": "textarea",
        "ui:placeholder": "Enter approval notes..."
      }
    }
  },
  {
    "title": "Request Revisions",
    "description": "Request revisions to the document",
    "id": "request-revisions",
    "schema": {
      "type": "object",
      "required": [
        "revision-areas",
        "revision-details"
      ],
      "properties": {
        "revision-areas": {
          "type": "array",
          "title": "Which areas need revision?",
          "items": {
            "type": "string",
            "enum": [
              "liability",
              "payment",
              "ip-rights",
              "termination",
              "confidentiality",
              "other"
            ]
          },
          "uniqueItems": true
        },
        "revision-details": {
          "type": "string",
          "title": "Revision Details",
          "description": "Describe the revisions needed"
        }
      }
    },
    "ui": {
      "revision-areas": {
        "ui:widget": "checkboxes",
        "ui:options": {
          "inline": true
        }
      },
      "revision-details": {
        "ui:widget": "textarea",
        "ui:placeholder": "Enter revision details..."
      }
    }
  }
]

Widgets used

  • attachments
  • checkboxes
  • currency
  • radio
  • textarea

See Context for widget reference.