> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# toInboundLocation()

> Function exported by @botmesh/core/spi.

```ts theme={null}
function toInboundLocation(input): InboundLocation | undefined;
```

Defined in: [core/location.ts:34](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/location.ts#L34)

Build a normalized [InboundLocation](https://botmesh.afaya.com.co/api/core/interfaces/InboundLocation.md), or `undefined` when the coordinates are
missing, not finite or out of range (latitude −90…90, longitude −180…180). Numeric
strings are accepted; empty `name`/`address` strings are dropped; `live` is set only
when `true`.

## Parameters

| Parameter | Type |
| - | - |
| `input` | \| [`InboundLocationInput`](https://botmesh.afaya.com.co/api/core/spi/interfaces/InboundLocationInput) \| `null` \| `undefined` |

## Returns

[`InboundLocation`](https://botmesh.afaya.com.co/api/core/interfaces/InboundLocation) | `undefined`

## Example

```ts theme={null}
const location = toInboundLocation({ latitude: msg.location?.latitude, longitude: msg.location?.longitude, name: msg.location?.name })
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.