> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/1.3/g2p-bridge/development/design-specifications/out-apis-to-mapper/resolve.md).

# resolve

## Trigger

1. resolve API invoked by mapper\_resolution\_worker (Celery worker task)
2. Worker invoked by mapper\_resolution\_beat\_producer (Celery beat producer)

## **mapper\_resolution\_beat\_producer**

<table><thead><tr><th width="235"></th><th></th></tr></thead><tbody><tr><td>frequency</td><td>hourly (specified by configuration yml)</td></tr><tr><td>attempts</td><td>yes. subject to a configurable limit specified by configuration yml</td></tr><tr><td><mark style="color:purple;">driving table</mark></td><td><mark style="color:purple;">mapper_resolution_batch_status</mark></td></tr><tr><td>eligible records</td><td><mark style="color:blue;">resolution_status = 'PENDING'</mark></td></tr></tbody></table>

1. Pick up all "PENDING" records from mapper\_resolution\_batch\_status
2. Dispatch a Task to Resolution Worker Task with Payload = mapper\_resolution\_batch\_id

## mapper\_resolution\_worker

1. **Payload received** - disbursement\_mapper\_resolution\_batch\_id
2. get a list of disbursement\_id, beneficiary\_id from disbursement\_batch\_control
3. Create a Map of \<beneficiary\_id, disbursement\_id>
4. Create Payload for Mapper - Resolve API - with List of Beneficiary IDs
5. Invoke Mapper - Resolve API, send the list of beneficiary IDs, receive Financial Address

<mark style="color:blue;">**SUCCESS (from mapper resolution API invoke)**</mark>

1. Use the Map of \<beneficiary\_id, disbursement\_id> to insert into the table disbursement\_mapper\_resolution\_details
2. Update table - mapper\_resolution\_batch\_status (resolution\_status = PROCESSED, resolution\_attempts+ = 1)
3. Insert resolution details into mapper\_resolution\_details (use the map of \<beneficiary\_id, disbursement\_id> for this

<mark style="color:blue;">**FAILURE (from mapper resolution API invoke)**</mark>

1. Update table - mapper\_resolution\_batch\_status (resolution\_status = PENDING, latest\_error\_code, resolution\_attempts+ = 1)

## **mapper\_resolution\_details**

<table><thead><tr><th width="316">Attribute</th><th>Description</th></tr></thead><tbody><tr><td>mapper_resolution_batch_id</td><td>Non Unique Index</td></tr><tr><td>disbursement_id</td><td>Unique Index</td></tr><tr><td>beneficiary_id</td><td>Non Unique Index</td></tr><tr><td>mapper_resolved_fa</td><td></td></tr><tr><td>mapper_resolved_phone_number</td><td></td></tr><tr><td>mapper_resolved_email_address</td><td></td></tr><tr><td>mapper_resolved_name</td><td></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.openg2p.org/1.3/g2p-bridge/development/design-specifications/out-apis-to-mapper/resolve.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
