Workflows

The following steps describe the flow for ordering Opening and Closing document packages for an existing loan with the Send Encompass Docs APIs.

1. Apply a Plan Code

The plan code determines the documents that will be included in the package and the loan program data that will be applied to the loan to correctly render the documents. This step may be done outside the context of the document order if the plan code is applied to the loan prior to initiating the disclosure order.

If a plan code is not already applied to the loan, the Manage Plan Codes API allows the caller to retrieve a list of company plan codes and apply a selected plan code to a loan file.

Manage Plan Codes APIs

The Get Plan Codes API retrieves a list of plan codes used by the caller's company when generating disclosures. A generic plan code can be applied if the investor is unknown.

GET /encompassdocs/v1/planCodes?planCodeType={opening | closing}

The Apply Plan Code API applies the selected plan code to the loan file.

POST /encompassdocs/v1/planCodes/{planCodeID}/evaluator

2. Audit the Loan

In this step, document rules are run to confirm the required data is present and valid in the loan file. When auditing a loan file, the Audit Loan API runs audit rules on the following four categories:

  • Data audit – Identifies missing field values.
  • Plan code conflicts - Identifies any plan code conflicts.
  • Compliance errors – Identifies errors with form or documents and compliance issues.
  • Loan print form rules errors – Ensures business rules set on the instance are completed and satisfied.

If there are issues, the related field IDs and audit messages are returned in the response. All required issues must be resolved before generating disclosures.

Loan Audit APIs

Use the Create Loan Audit APIs to run document rules. This is an asynchronous flow that returns an identifier (Loan Audit ID) in the response.
API for running a loan audit for document orders:

POST /encompassdocs/v1/documentAudits/{opening | closing}

📘

Closing Orders and Mavent Compliance Reports

Note that when running document rules for Closing Orders, the loan file must be audited by the Encompass Docs Solution and the Encompass Compliance Service (powered by Mavent).

Get Loan Audit Status

The caller can poll for the request status with the Get Audit Status API or subscribe to a webhook notification to be alerted when the audit is complete.

3. Generate Document Set

Generate a set of documents for the selected package to meet the requirements of various loan scenarios or lenders.

Generate Doc Set APIs

Use the Generate Doc Set APIs to generate a list of documents for a selected package. This is an asynchronous flow that returns an identifier (Doc Set ID) in the response. The type of doc set to generate is indicated by the endpoint.

Generate Opening Doc Set:
POST /encompassdocs/v1/documentOrders/opening

Generate Closing Doc Set:
POST encompassdocs/v1/documentOrders/closing

Generate Forms:
POST /encompassdocs/v1/documentOrders/forms

Get Document Order Status

The caller can poll for the request status with the Get Order Status API or subscribe to a webhook notification to be alerted when the order is complete.

4. Add Additional eFolder Docs (Optional)

The document package can be updated to include additional content from the eFolder if needed.
Use the Add Documents to Order API to add one or more additional documents to the package order. Additional documents can include Encompass Forms or eFolder documents.

API for Adding eFolder Docs to Opening Orders:
POST /encompassdocs/v1/documentOrders/opening/{docSetId}/documents

API for Adding eFolder Docs to Closing Orders:
POST /encompassdocs/v1/documentOrders/closing/{docSetId}/documents

Confirm and Send Package

When the document set is complete, including any optional documents from the eFolder, the caller can finalize the package.

The Send Document Package API commits and sends the document order to the recipient. The API requires the docset ID and parties returned in the response payload in Step 3.

API for Sending Opening Orders:
POST encompassdocs/v1/documentOrders/opening/{docSetId}/delivery

API for Sending Closing Orders:
POST encompassdocs/v1/documentOrders/closing/{docSetId}/delivery

This is an asynchronous flow and will return an identifier (deliveryOrderID) in the response.

When delivery is successful, the following occurs:

  • A Disclosure Tracking entry is created in Encompass.
  • Document containers are created in the eFolder
  • The recipients receive an email notification from the borrower portal. Borrower and non-borrowing owners will be directed to Consumer Connect.
  • Closing Package orders will be directed to Loan Connect for execution by the settlement agent.

Get Delivery Status

The caller can poll for the request status with the Get Order Status API or subscribe to a webhook notification to be alerted when the order is complete.