# Call Back

#### Primary Field

<table><thead><tr><th width="187">UI Name</th><th width="187">PRIMARY-FIELD</th><th width="130">Type</th><th>Remarks</th></tr></thead><tbody><tr><td>Creditor / Debtor Account</td><td><pre><code>AccNo
</code></pre></td><td><code>String</code></td><td>E.g.: <code>301-A001</code>, <code>401-A002</code></td></tr></tbody></table>

#### CallBack Field

<table><thead><tr><th width="187">UI Name</th><th width="187">CALLBACK-FIELD</th><th width="130"></th><th>Remarks</th></tr></thead><tbody><tr><td>Tax Entity/TIN</td><td><pre><code>Tin
</code></pre></td><td><code>String</code></td><td>E.g.: <code>NoTIN-00000001</code></td></tr></tbody></table>

{% hint style="warning" %}
To enable Call Back Hook, add a `callBackHook` property to `jobs.json`. ([refer link](https://inistate.gitbook.io/home/advanced/integration/pages/tHI9sphR5fjudWNkCf0v#jobs.json-with-call-back-1))
{% endhint %}

{% tabs %}
{% tab title="CallBack Script" %}
{% hint style="info" %}
To find `{fieldName}` , you are required to have access to **Alpha** or use **Network** in Developer Tools `[F12]`.
{% endhint %}

```python
moduleName = "{YOUR_MODULE_NAME}"
if inputs is not None and inputs['result'] is not None and inputs['result']['{PRIMARY-FIELD}'] is not None and inputs['result']['{CALLBACK-FEILD}'] is not None:
    doc = Module(moduleName).find({ 'Dynamic.Extension.{fieldName}': inputs['result']['{PRIMARY-FIELD}'] })
    if doc is not None:
        newValue = inputs['result']['{CALLBACK-FEILD}']
        if doc['{YOUR-FIELD-TO-UPDATE}'] == '' or doc['{YOUR-FIELD-TO-UPDATE}'] != newValue:
            form = Module(moduleName).execute('sync', doc)
            form['{YOUR-FIELD-TO-UPDATE}'] = newValue
            Module(moduleName).submit(doc, form)
```

{% 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://inistate.gitbook.io/home/advanced/integration/call-back.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.
