# Loan Screening DVR

Following the zkPass SDK guideline, BCA Finance which takes the client role of the Proof Verifier,  defines the “Loan Screening” [DVR](https://gl-docs.gitbook.io/zkpass/getting-started/key-concepts/dvr) for users who are applying for the car loan. The requirements for the car loan are encapsulated in a query, which is detailed in the Data Verification Request (DVR). This query is formulated using the zkPass Query language, which is JSON-based.

## <mark style="color:blue;">Query</mark>

The DVR Query for Ramana Maharshi looks like the following.

{% tabs %}
{% tab title="Human Format" %}
All these conditions must be met for the overall criteria to be satisfied:

1. The Document ID (`bcaDocID`) should exactly match "DOC897923CP", which is the document id for BCA Customer Profile.
2. The first name under `personalInfo` should match "Ramana" (case insensitive).
3. The last name under `personalInfo` should match "Maharshi" (case insensitive).
4. The driver's license number under `personalInfo` should match "DL77108108" (case insensitive).
5. The credit rating from Pefindo, found under `financialInfo`, should be equal to or greater than 650.
6. The balance in the savings account, under `financialInfo`, should be equal to or greater than 55,000,000.
   {% endtab %}

{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
[
  {
    "assign": {
      "loan_application": {
        "and": [
          {
            "==": [
              {
                "dvar": "bcaDocID"
              },
              "DOC897923CP"
            ]
          },
          {
            "~==": [
              {
                "dvar": "personalInfo.firstName"
              },
              "Ramana"
            ]
          },
          {
            "~==": [
              {
                "dvar": "personalInfo.lastName"
              },
              "Maharshi"
            ]
          },
          {
            "~==": [
              {
                "dvar": "personalInfo.driverLicenseNumber"
              },
              "DL77108108"
            ]
          },
          {
            ">=": [
              {
                "dvar": "financialInfo.creditRatings.pefindo"
              },
              650
            ]
          },
          {
            ">=": [
              {
                "dvar": "financialInfo.accounts.savings.balance"
              },
              55000000
            ]
          }
        ]
      }
    }
  },
  {
    "output": {
      "title": "Loan Query Results"
    }
  },
  {
    "output": {
      "result": {
        "lvar": "loan_application"
      }
    }
  },
  {
    "if": {
      "condition": {
        "lvar": "loan_application"
      },
      "then": [
        {
          "output": {
            "name": {
              "dvar": "personalInfo.firstName"
            }
          }
        }
      ],
      "else": [
        {
          "output": {
            "rejected": "Your loan application has been rejected."
          }
        }
      ]
    }
  }
]
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gl-docs.gitbook.io/zkpass/use-cases/loan-application-screening/loan-screening-dvr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
