# 2. Receiving Inbound Requests

**Previewing the Data**

The CRM is now set up to send requests to the integration we created in Integration Gateway, but the integration is not set up to read the data that's being sent.

To start, we'll trigger a request from the CRM to view the request's payload structure on a live example.

Fill out all the fields in the CRM, then click *Send to Core.* You will see an error on CRM, which is expected at this stage.

<figure><img src="/files/Yr5DWXTXZtEGsZQx71G7" alt=""><figcaption><p>Filling out an entry in the Mock CRM</p></figcaption></figure>

In Integration Gateway, open the **Run History** and click on the most recent entry, then click on *INPUT* in the Steps column.

{% hint style="info" %}
If you don't see a new run, re-enter the URL you entered in [step 1](/tutorials/building-an-event-driven-integration/1.-setting-up-the-mock-crm.md). If the URL is incorrect, the request won't show up in the **Run History**.\
\
If you still don't see the request, reach out to <support@sandboxbanking.com> to verify your IP allowlist settings to ensure external traffic is allowed to reach your Integration Gateway instance.
{% endhint %}

You should see the data you entered in the CRM appear as fields in the `payload`. Notice that while the meaning of the fields are the same as those from `randomuser.me`, the naming and structure are slightly different.

<figure><img src="/files/gnZKKAyV2daflSJYNxSO" alt=""><figcaption><p>Viewing the payload structure from the CRM.</p></figcaption></figure>

Now that we have the structure of the data from the CRM, we need to adjust our mappings to reflect it.

**Removing the Call to randomuser.me**

First, we'll remove the service request that calls `randomuser.me` because we are no longer using it as the source of our user information.

In Integration Gateway, navigate to the **Build page*****,*** select our integration, right-click, and *Go To > Service Request*.

Right click on the service request with a *Formula name* of `request_users`. Click *Delete.*

<figure><img src="/files/lqLKI9QLeWvgRLjDC9SE" alt=""><figcaption><p>Deleting the <code>request_users</code> Service Request</p></figcaption></figure>

**Updating the Call to the Core**

Right click on the remaining service request (`create_new_customer`) and click *Go To > Field Mapping*.

We will adjust the *Value* column, keeping the *Field* column the same.

<table><thead><tr><th width="151">Field</th><th>Old Value</th><th>New Value</th></tr></thead><tbody><tr><td>First Name</td><td><code>request_users.response.payload.results[0].name.first</code></td><td><code>input.payload.firstname</code></td></tr><tr><td>Last Name</td><td><code>request_users.response.payload.results[0].name.last</code></td><td><code>input.payload.lastname</code></td></tr><tr><td>Email</td><td><code>request_users.response.payload.results[0].email</code></td><td><code>input.payload.email</code></td></tr><tr><td>DOB</td><td><code>request_users.response.payload.results[0].dob.date</code></td><td><code>input.payload.dob</code></td></tr></tbody></table>

{% hint style="info" %}
Note that the `PersTypes.PersonTypeCode` and `url_path`fields did not change, as their value are hard-coded.
{% endhint %}

<figure><img src="/files/Eo9WK4sDybOuho2vIEId" alt=""><figcaption><p>Updating Field Mapping values</p></figcaption></figure>

Save your changes.


---

# 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://glyue.docs.sandboxbanking.com/tutorials/building-an-event-driven-integration/2.-receiving-inbound-requests.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.
