AgenticUniverse - Previously Formi
  1. Post Interaction Configuration
AgenticUniverse - Previously Formi
  • Our Technical Note
    • Why Open AI is not Enough
    • How business Outcomes would Change Radically with AgenticUniverse
    • Our Research
      • STT - Nuances and Insights
      • Solving for STT Constraints
  • Generate Token
    • Login/Generate Token
      POST
  • Agent Configuration
    • Model Configuration
      • Configuration Helpers
        • Supported Providers
        • Supported Models
        • Supported Parameters
      • Get Model Configuration
      • Set Model Configuration
    • State Machine
      • Edge
        • Legacy
          • Create Edge
          • Edge Details
          • Update Edge
          • Delete Edge
        • Update edge properties
        • Get edge details
        • Delete an edge
        • Create an edge (transition) between two states
      • State
        • Create State from Template
        • Get State Information
        • Update State
        • Delete State
      • Get State Machine Structure
    • Prompt Templates
      • Get All Templates
      • Render Template
    • Tools
      • Get Tools List
      • Add Tool
      • Update Tool
      • Delete Tool
    • Get All Agents
      GET
    • Single Agent Details
      GET
    • Create Agent
      POST
    • Update Agent Details
      PUT
    • Enable Dashboard For An Outlet
      POST
    • Disable Dashboard For An Outlet
      POST
    • Get Call queue Sheet ID
      GET
  • Interactions
    • Pre-Interaction Context
      • Schedule an Interaction
      • Update an Interaction Id
      • Delete an Interaction Id
      • Clear all interactions
      • Get Summarized Interaction Info
    • Interaction Modalities
      • Video
        • Generation
          • Generate Welcome Video
      • Text
        • Start Interaction
        • Create Response
        • End Interaction
      • Voice
        • Connection Configuration
          • Quickstart
          • Connecting Twilio
          • Connecting Exotel
          • Formi WebSocket Configuration Guide
          • Create a New Connection Vendor
          • Get All Connection Vendors
          • Update a Connection Vendor
          • Delete a Connection Vendor
          • Get Agent's Connection Config
          • Add or Update Agent's Connection Config
    • Post Interaction Configuration
      • Email Destination Configuration
      • Variables CRUD
        • Get all required variables for the outlet with map
        • Modify variable definition for outlet
        • Add a new variable for the outlet
        • DELETE variable for outlet
        • Connect Variable to a destination
      • Destinations CRUD
        • Get all destinations for the outlet
        • Modify Destination for outlet
        • Add a new Destination for the outlet
        • DELETE Destinations for outlet
    • Get Interaction Summary
      GET
    • Resolve an Escalated Interaction
      POST
    • Get the Interaction list
      GET
    • Get Information regarding Single Interaction
      GET
  • Agent Utilisation
    • Get Credits Available
    • Interaction Utilisation
    • Model Utilisation
  • Webhooks
    • Get webhook URL
    • Update webhook URL
    • Get webhook metadata
    • Modify webhook metadata
    • Get reservation ingestion metadata
  • Untitled Endpoint
    POST
  1. Post Interaction Configuration

Email Destination Configuration

Defines how call data is sent via email to the configured destination_email_id. Includes the API endpoint, headers, and a dynamic payload with details like customer info, enquiry summary, and transcript for real-time notifications.
This can be used in raw for testing the Email API, and as a Destination for our Agent.
For Endpoint Reference - Email Destination.

Email Payload Field Descriptions#

FieldDescription
destination_email_idThe recipient's email address (e.g., hotel manager or stakeholder).
email_subjectThe subject line for the email notification.
nameName of the customer who was part of the interaction.
phone_numberCustomer’s phone number (with country code).
email_idCustomer’s email address.
call_typeNature of the interaction, e.g., Enquiry, Booking, Support.
call_statusFinal status of the interaction—typically Completed, Missed, or Failed.
timestampDate and time when the interaction occurred.
stakeholder_phonePhone number of the business contact receiving this information.
is_manager_callIndicates if the call involved a manager or senior executive.
enquiry_typeCategorization of the enquiry (e.g., Reservation, Complaint, Info Request).
enquiry_detailsSummary of what the customer asked or discussed.
occasionOccasion type if mentioned (e.g., Birthday, Anniversary).
booking_metadataStructured booking notes—guest count, date/time, and special requests.
transcriptText transcript or notes captured from the interaction.

Step-by-Step Flow#

Step 1: POST Variable#

Define all dynamic variables that will be used in the email body.
Endpoint:
POST /v2/post_call/data/outlet/variables
Sample Request Body:
[
    {
        "var_name": "customer_name",
        "var_type": "string",
        "description": "name of the customer as inferred from the conversation",
        "variable_id": 98765432,
        "destination_ids": [
            32657790,
            81891481,
            22529718
        ]
    },
    {
        "var_name": "customer_phone_no.",
        "var_type": "string",
        "description": "phone No. of the customer as inferred from the conversation",
        "variable_id": 25589883,
        "destination_ids": [
            90824215
        ]
    }
]

Step 2: GET Variable#

Fetch the variables defined in the system for mapping and validation.
Endpoint:
GET /v2/post_call/data/outlet/variables

Sample Response Body#

{
    "message": "success",
    "payload": [
        {
            "var_name": "name",
            "var_type": "string",
            "description": "Name of the customer",
            "variable_id": 54,
            "destination_ids": [
                4,
                5
            ]
        },
        {
            "var_name": "email_id",
            "var_type": "string",
            "description": "Email of the user",
            "variable_id": 55,
            "destination_ids": [
                4,
                5
            ]
        },
        {
            "var_name": "phone_number",
            "var_type": "string",
            "description": "phone number of the user",
            "variable_id": 56,
            "destination_ids": [
                4,
                4,
                5
            ]
        },
        {
            "var_name": "enquiry_type",
            "var_type": "string",
            "description": "enquiry asked by the user",
            "variable_id": 57,
            "destination_ids": [
                4,
                5
            ]
        },
        {
            "var_name": "occasion",
            "var_type": "string",
            "description": "occasion mentioned by the user",
            "variable_id": 58,
            "destination_ids": [
                4,
                5
            ]
        },
        {
            "var_name": "call_summary",
            "var_type": "string",
            "description": "Summary of the entire conversation with the user , described in around 30-40 words",
            "variable_id": 60,
            "destination_ids": [
                4,
                5
            ]
        }
    ]
}

Step 3: POST Destination (Email)#

Create a destination of type email that specifies the API endpoint and body.
Endpoint:
POST /v2/post_call/data/destinations
Sample Request Body:
[
    {
        "destination_name": "Email",
        "destination_type": "email",
        "api_url": "https://api.formi.co.in/v2/destinations/email",
        "api_method": "POST",
        "api_headers": {
            "Content-Type": "application/json"
        },
        "api_body": {
            "destination_email_id": "admin@olivehotels.com",
            "email_subject": "Call Notification | Formi Chat AI",
            "name": "John Smith",
            "phone_number": "{{customer_phone_number}}",
            "email_id": "{{customer_email_id}}",
            "call_type": "Enquiry",
            "call_status": "Completed",
            "timestamp": "2024-01-20 14:30:00",
            "stakeholder_phone": "+91 1234567890",
            "is_manager_call": "No",
            "enquiry_type": "Reservation",
            "enquiry_details": "{{enquiry_summary}}",
            "occasion": "{{occasion}}",
            "booking_metadata": "{{booking_metadata}}",
            "transcript": "{{transcript}}"
        }
    }
]

Step 4: GET Destination#

Fetch destination details to ensure proper setup and structure.
Endpoint:
GET /v2/post_call/data/destinations

Sample Response Body#

{
  "message": "Destinations fetched successfully",
  "payload": [
    {
      "destination_id": 1,
      "destination_name": "Email",
      "destination_type": "email",
      "api_url": "https://api.formi.co.in/v2/destinations/email",
      "api_method": "POST",
      "api_headers": {
        "Content-Type": "application/json"
      },
      "api_body": {
        "destination_email_id": "admin@olivehotels.com",
        "email_subject": "Call Notification | Formi Chat AI",
        "name": "John Smith",
        "phone_number": "{{customer_phone_number}}",
        "email_id": "{{customer_email_id}}",
        "call_type": "Enquiry",
        "call_status": "Completed",
        "timestamp": "2024-01-20 14:30:00",
        "stakeholder_phone": "+91 1234567890",
        "is_manager_call": "No",
        "enquiry_type": "Reservation",
        "enquiry_details": "{{enquiry_summary}}",
        "occasion": "{{occasion}}",
        "booking_metadata": "{{booking_metadata}}",
        "transcript": "{{transcript}}"
      },
      "created_at": "2024-01-19T18:30:00Z",
      "updated_at": "2024-01-20T10:15:00Z",
      "active": true
    }
  ]
}

Step 5: Connect Variables to Destination#

Map defined variables to the placeholders used in the destination payload.
Endpoint:
POST /v2/post_call/data/outlet/{outlet_id}/map
Sample Request Body:
[
    {
        "variable_id": 20,
        "destination_id": 3
    }
]

Modified at 2025-07-04 11:43:55
Previous
Post Interaction Configuration
Next
Get all required variables for the outlet with map
Built with