Add I-130A to I-130

Published
Part of package: I-130 Workflow
Created By: Eric Arnold

Definition Template

{
  "actions": [
    {
      "id": "add_form_3b9feb4e1b73",
      "type": "AddAdditionalForm",
      "config": {
        "form_id": "form_RbyXZBVeOL9wCkEQJ672M35j"
      }
    }
  ],
  "trigger": {
    "type": "FormCompleted",
    "config": {
      "form_id": "form_raeA4zvVQBrNCAgQ31PM6B9W",
      "conditions": [
        {
          "type": "form_field_checked",
          "field": "form1_0_subform_0_pt1line1_spouse_0"
        }
      ]
    }
  }
}
Dependencies (Actions)
Intake Form I-130A
Dependencies (Trigger)
Intake Form I-130
Uninstalled
You may install this automation using the configuration below.


(Defaults to the template definition, modify as needed for this installation.)

Automation definition

An automation has one trigger and an ordered list of actions. This reference is also the contract available to the Deep Docket Assistant.

{
  "trigger": {
    "type": "FormCompleted",
    "config": {
      "form_id": "form_..."
    }
  },
  "actions": [
    {
      "id": "create_follow_up_tasks",
      "type": "CreateTaskList",
      "config": {
        "tasks": [
          {
            "name": "Review submission",
            "due_date": {
              "days_from_now": 2
            }
          }
        ]
      }
    }
  ]
}

Available triggers

The event in trigger.type that starts an automation.

FormCreated

Run when an intake is initiated.

Required: form_id

  • form_id may be * to match any intake form.
{
  "type": "FormCreated",
  "config": {
    "form_id": "form_..."
  }
}

FormCompleted

Run when an intake is submitted.

Required: form_id

  • form_id may be *.
  • Optional conditions evaluate intake field variable names.
{
  "type": "FormCompleted",
  "config": {
    "form_id": "form_...",
    "conditions": [
      {
        "type": "form_field_checked",
        "field": "ready_to_file"
      }
    ]
  }
}

DocumentRequestCompleted

Run when a matching document request is completed.

Required: document_request_template_id

  • document_request_template_id may be * to match any template.
{
  "type": "DocumentRequestCompleted",
  "config": {
    "document_request_template_id": "doc_req_..."
  }
}

DocumentSignedByAll

Run after every signer completes a document.

Required: signable_document_template_id

{
  "type": "DocumentSignedByAll",
  "config": {
    "signable_document_template_id": "sign_doc_..."
  }
}

FinalizedFormPdf

Run after all conditionally required filled or signed form PDFs exist.

Required: forms

  • forms must be a non-empty ordered array.
  • generation_type is form_filled or signable_from_filled.
  • Each form may have optional conditions.
{
  "type": "FinalizedFormPdf",
  "config": {
    "forms": [
      {
        "id": "form_...",
        "generation_type": "form_filled"
      },
      {
        "id": "form_...",
        "generation_type": "signable_from_filled",
        "conditions": [
          {
            "type": "form_field_checked",
            "field": "include_spouse",
            "form_id": "form_..."
          }
        ]
      }
    ]
  }
}

StageUpdated

Run when a matter moves from or to a stage.

At least one: from_stage_id, to_stage_id

{
  "type": "StageUpdated",
  "config": {
    "to_stage_id": "stage_..."
  }
}

AutomationCompleted

Run after a named automation completes successfully.

Required: automation_id

{
  "type": "AutomationCompleted",
  "config": {
    "automation_id": "aut_..."
  }
}

Available actions

Actions run in array order. Give every action a stable, unique id.

CreateAccessGrant

Grant configured matter access to the client or another participant.

Required: access_grant

  • access_grant requires name, account_user_id, and expiry_days. Explicit recipients must be firm users or agent contacts known to the firm.
{
  "id": "grant_client_access",
  "type": "CreateAccessGrant",
  "config": {
    "access_grant": {
      "name": "Client access",
      "account_user_id": "client",
      "expiry_days": 30
    }
  }
}

CreateDocumentRequest

Create a document request from a template.

Required: document_request_template_id, role_mappings

  • role_mappings must contain recipient; recipient may be client or a user/account-user ID available to the firm and current matter.
{
  "id": "request_passport",
  "type": "CreateDocumentRequest",
  "config": {
    "document_request_template_id": "doc_req_...",
    "role_mappings": {
      "recipient": "client"
    }
  }
}

CreateSignableDocument

Create a signable document from a template.

Required: signable_document_template_id, role_mappings

  • Map every template role to client, firm_user, or an accessible user ID.
{
  "id": "prepare_signature_copy",
  "type": "CreateSignableDocument",
  "config": {
    "signable_document_template_id": "sign_doc_...",
    "role_mappings": {
      "client": "client"
    }
  }
}

UpdateStage

Move the current matter to a named stage.

Required: new_stage_id

{
  "id": "move_to_review",
  "type": "UpdateStage",
  "config": {
    "new_stage_id": "stage_..."
  }
}

AddAdditionalForm

Add another intake form to the current matter.

Required: form_id

{
  "id": "add_follow_up",
  "type": "AddAdditionalForm",
  "config": {
    "form_id": "form_..."
  }
}

SyncFormFields

Copy explicitly mapped structured answers between forms.

Required: source_form_id, target_form_id, field_mappings

  • Each mapping needs target_field and exactly one of source_field or source_value.
  • The only currently supported source_value is client.email.
{
  "id": "copy_contact_details",
  "type": "SyncFormFields",
  "config": {
    "source_form_id": "form_...",
    "target_form_id": "form_...",
    "field_mappings": [
      {
        "source_field": "petitioner_name",
        "target_field": "applicant_name"
      },
      {
        "source_value": "client.email",
        "target_field": "applicant_email"
      }
    ]
  }
}

CombineFormPdfs

Combine conditionally selected filled or signed PDFs in order.

Required: output_name, forms

  • generation_type is form_filled or signable_from_filled.
{
  "id": "combine_filing_packet",
  "type": "CombineFormPdfs",
  "config": {
    "output_name": "Filing packet",
    "forms": [
      {
        "id": "form_...",
        "generation_type": "form_filled"
      }
    ]
  }
}

SendNotification

Send an in-app notification and optionally an email.

Required: recipient, message, send_email

  • recipient is client, firm, or an account-user ID available to the firm and current matter.
  • title is required when send_email is true.
{
  "id": "notify_client",
  "type": "SendNotification",
  "config": {
    "recipient": "client",
    "title": "Documents ready",
    "message": "Your documents are ready for review.",
    "send_email": true,
    "tab": "documents"
  }
}

CreateTaskList

Create an ordered list of unassigned matter tasks.

Required: tasks

  • Each task should have a name and may include description, priority, and due_date.
  • due_date may be an ISO date or a relative days_from_now/weeks_from_now object.
{
  "id": "create_review_tasks",
  "type": "CreateTaskList",
  "config": {
    "tasks": [
      {
        "name": "Review submission",
        "priority": "high",
        "due_date": {
          "days_from_now": 2
        }
      },
      {
        "name": "Prepare filing package",
        "priority": "normal"
      }
    ]
  }
}

Conditions

Conditions evaluate intake answers by field variable_name. An array means AND; use a group object for another operator.

Condition types

form_field_checked
True when the named checkbox-like intake field is checked.
form_field_equals
True when the field exactly matches value.
form_field_contains
True when the field contains value.

Group operators

AND
Every nested condition must be true.
OR
At least one nested condition must be true.
XOR
Exactly one nested condition must be true.
{
  "operator": "OR",
  "conditions": [
    {
      "type": "form_field_checked",
      "field": "include_spouse"
    },
    {
      "type": "form_field_equals",
      "field": "case_type",
      "value": "family"
    }
  ]
}

Essential: sign-in, security, and your cookie choice.