# Agent handoff: Plan Your Safari

When a traveller wants The Jungle Safari to plan a trip, do this in the chat:

1. Ask for missing details: dates or month, trip length (days), party size, target wildlife, name, email, phone, country.
2. Call seasonality (`/agent/seasonality.json`) before recommending months. Avoid closedMonths.
3. Recommend parks from the catalogue (prefer same region).
4. Create a short Plan Your Safari link with `POST /api/plan-link` and give that URL as the next step.
5. Tell them the page opens with their itinerary and contact details filled; they review and tap Submit Inquiry. Reply comes within one working day.


## WhatsApp deep link

`https://wa.me/919878601010?text=<url-encoded message>`

Suggested draft body (use `%0A` newlines):

```
Hi, I'd like to plan a safari.
Parks: corbett, bandhavgarh
Duration: 9 days
Travellers: 2
Travel month: 2027-03
```

## Builder URL aliases

These are equivalent on `/plan-your-safari`:

| Preferred | Alias |
|---|---|
| destinations=corbett,bandhavgarh | parks=jim-corbett-national-park,bandhavgarh-national-park |
| duration=9 | days=9 |
| party=2 | travellers=2 |
| start=2027-03-15 | month=2027-03 (seasonality / contact date hint) |

Copy plan link and WhatsApp buttons appear in the builder once parks are selected.

## Preferred in chat: suggest itinerary

`POST https://thejunglesafari.com/api/suggest-itinerary`

Example body:

```json
{
  "wildlife": "tiger",
  "region": "central",
  "duration": 8,
  "start": "2027-02-15",
  "party": 2,
  "country": "US",
  "notes": "First safari, anniversary"
}
```

Response includes `stops`, `warnings`, `summary`, and `planUrl`. Present the outline in chat, then give the traveller `planUrl`.

## Preferred: short plan link

`POST https://thejunglesafari.com/api/plan-link`

JSON body (all fields optional; send what you know):

```json
{
  "destinations": ["corbett", "bandhavgarh"],
  "duration": 8,
  "start": "2027-02-15",
  "party": 2,
  "children": 0,
  "lodgeTier": "mid",
  "name": "Asha Mehta",
  "email": "asha@example.com",
  "phone": "+14155550123",
  "country": "US",
  "notes": "Anniversary trip, first safari, photography focus."
}
```

Response:

```json
{
  "success": true,
  "url": "https://thejunglesafari.com/go/<token>"
}
```

Give the traveller the `url`. It redirects into a prefilled planner.

## Fallback: long prefill URL

Base: `https://thejunglesafari.com/plan-your-safari`

| Param | Example | Notes |
|---|---|---|
| destinations | corbett,bandhavgarh,kanha | Comma-separated slugs |
| duration | 8 | Days, 3–21 |
| start | 2027-02-15 | YYYY-MM-DD |
| end | 2027-02-25 | YYYY-MM-DD |
| party | 2 | Adults |
| children | 0 | Children |
| lodgeTier | mid | budget \| mid \| luxury |
| name | Asha%20Mehta | URL-encoded |
| email | asha%40example.com | URL-encoded |
| phone | %2B14155550123 | E.164 preferred |
| country | US | ISO-3166-1 alpha-2 |
| notes | Photography%20focus | URL-encoded |

Valid destination slugs:
`corbett`, `rajaji`, `pangot`, `sattal`, `pilibhit`, `dudhwa`, `bandhavgarh`, `kanha`, `pench`, `panna`, `ranthambhore`, `bharatpur`, `kaziranga`, `sunderbans`, `manas`, `agra`, `jaipur`, `khajuraho`

## Seasonality

`GET https://thejunglesafari.com/agent/seasonality.json`

Use `openMonths`, `bestMonths`, and `closedMonths` (1=Jan … 12=Dec). Do not recommend parks in their closed months unless the traveller insists, then warn them.

## Example shortlink flow

Traveller: couple, first tiger safari, ~8 days, February 2027, US, anniversary.

1. Confirm Feb is open for chosen parks (Corbett / Bandhavgarh: yes).
2. `POST /api/plan-link` with destinations, start, duration, party, contact, notes.
3. Reply with the returned `url` only (not a long query string).

Schema source: https://thejunglesafari.com/agent/inquiry-schema.json  
Seasonality: https://thejunglesafari.com/agent/seasonality.json  
Site briefing: https://thejunglesafari.com/llms.txt
