American Hospital DubaiMedricsAI integration handbook

Conversation platform setup

Configure one authenticated API node, two response mappings, and a deterministic transfer branch.

Sprinklr
Medrics
OpenAI
Handoff

Configuration sequence

Complete the steps in order in a non-production dialogue tree first. Medrics provides the bearer token through the agreed secure channel.

01

Create the External API

In Sprinklr, open External APIs and create an HTTPS POST connection named Medrics AHD AI Gateway.

02

Set the production URL

Use https://api.ahd.ai.medrics.net/v1/ahd/chat and set Content-Type to application/json.

03

Add authorization

Set Authorization to Bearer followed by the Medrics-issued token. Store it in the Sprinklr credential facility, never in a dialogue message or visible variable.

04

Map the request

Map current user input to message and the case conversation to conversation_history. Add channel and locale only when reliable values exist.

05

Map the response

Map answer to medrics_answer and handoff to medrics_handoff. Preserve the boolean type for handoff; do not add a second citation or contact-formatting expression.

06

Display the answer

If medrics_handoff is true, transfer to the approved AHD queue. Otherwise display only medrics_answer exactly as returned; never render the complete API response.

Recommended request template

{
  "message": "{{current_user_message}}",
  "conversation_history": "{{case_conversation}}",
  "channel": "{{channel}}",
  "locale": "{{locale}}"
}

Fallback rule

Any non-200 response, timeout, invalid JSON, missing answer, or parsing failure must follow the same safe fallback: record the gateway request ID when available and transfer the conversation to the configured AHD human-support queue.

Patient-facing presentation

When medrics_handoff is false and medrics_answer is non-empty, the AHD channel displays only medrics_answer. It never renders the full API response, handoff value, error fields, headers, or unmapped values. The gateway never forwards separate OpenAI file-citation annotations. Phone numbers and email addresses remain exactly as produced under the approved AHD policy. The observed bare www.ahdubai.com address receives only an https:// prefix. The approved source-controlled policy decides which content is appropriate.

Continue to verification