{
  "form": {
    "archived": false,
    "list_view_fields": [],
    "public": false,
    "access": "Private",
    "connections": [],
    "created_by": {
      "id": "6230635087cd9e8f340ad2be",
      "first_name": "Deepak",
      "last_name": "Bhatt"
    },
    "name": "Check Account Data Using AI Agent",
    "page_count": 1,
    "current_page": 0,
    "deployed": true,
    "created_at": "2026-06-11T09:35:38.633Z",
    "pages": [
      {
        "components": [
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "SalesforceTable",
            "name": "Salesforce Table",
            "category": "salesforce",
            "label": "Records",
            "icon": "/scripts/formbuilder/img/salesforce.png",
            "version": "3",
            "attributes": {
              "query_fields": "",
              "query_limit": "50",
              "filter_fields": "",
              "query_visibility": "",
              "query_order_by": "",
              "query_search_group": "",
              "table_page_length": "",
              "custom_column_name": [],
              "offline_sync_filter": "",
              "custom_offline_lookup_filter": "",
              "sfdc_parent_field_name": "",
              "sfdc_parent_component": "",
              "sfdc_record_crud_field_mappings": [],
              "owner_field": "",
              "table_column_sort_order": "asc",
              "table_column_sort_index": "",
              "add_table_submit_button": false,
              "table_submit_button_label": "",
              "add_new_record_button": false,
              "enable_record_auto_submit": false,
              "csv_download_button_label": "",
              "disable_column_sort_ordering": false,
              "remove_id_field_from_sfdc_query": false,
              "sfdc_record_crud_type": "",
              "sfdc_record_crud_object": ""
            },
            "sfdc_query_fields": "Name,Phone,Type",
            "sfdc_query_limit": "50",
            "sfdc_filter_fields": "",
            "sfdc_query_visibility": "All Records",
            "sfdc_query_order_by": "",
            "sfdc_query_search_group": "",
            "object_label": "None Selected",
            "object_api_name": "Account",
            "component_id": "3d16-a03d-2758",
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "JavaScript",
            "name": "JavaScript",
            "category": "media",
            "label": "Custom JavaScript",
            "version": "2",
            "attributes": {
              "javascript_load_delay": "100",
              "script": "$('#component-3d16-a03d-2758').hide();\nformyoula.event_trigger(\"main:spinner_dialog\", {show:true})\n\nformyoula.form_fields['3d16-a03d-2758'].on( 'table:results:render:success', function() {\n\n    //Get table instance using related id\n    var salesforce_table = $('#salesforce_table_3d16-a03d-2758').DataTable();\n    //Get table data\n    var table_data = salesforce_table.rows().data().toArray()\nconsole.log(table_data)\n    formyoula.form_fields['1459-a3cd-0021'].set({value:JSON.stringify(table_data) },{ silent: true })\nformyoula.event_trigger(\"main:spinner_dialog\", {show:false})\n\n\n//$('#component-d5c2-2253-544d').show()\n} )",
              "script_detail": "",
              "load_javascript_only_once_per_session": false
            },
            "component_id": "ce5e-ccf0-9e9f",
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Voice_Agent",
            "name": "Voice Agent",
            "category": "other",
            "label": "Voice Agent",
            "icon": "https://d3iyvxaud7i110.cloudfront.net/apps/builder/elements/voice_agent.png",
            "attributes": {
              "read_text_from_field": "a1f2-b3c4-d5e6",
              "ai_prefill_component_id": "da78-f3f8-f209",
              "voice_agent_welcome_message": "",
              "start_button_label": "Start Speaking",
              "stop_button_label": "Stop",
              "voice_language": "en-US",
              "voice_name": ""
            },
            "component_id": "ba64-55fc-9333",
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Hidden",
            "value": "",
            "name": "Hidden",
            "category": "input",
            "label": "Record Contexts for AI",
            "icon": "/scripts/formbuilder/img/hidden.png",
            "component_id": "1459-a3cd-0021",
            "attributes": {
              "enable_merge_fields": false,
              "trim_hidden_field_value": false,
              "enable_advanced_templating": false,
              "reset_value_on_new_repeat_entry": false
            },
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Hidden",
            "value": "",
            "name": "Hidden",
            "category": "input",
            "label": "AI Voice Response",
            "icon": "/scripts/formbuilder/img/hidden.png",
            "component_id": "a1f2-b3c4-d5e6",
            "attributes": {
              "enable_merge_fields": false,
              "trim_hidden_field_value": false,
              "enable_advanced_templating": false,
              "reset_value_on_new_repeat_entry": false
            },
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Hidden",
            "value": "",
            "name": "Hidden",
            "category": "input",
            "label": "Duplicate Found",
            "icon": "/scripts/formbuilder/img/hidden.png",
            "component_id": "f1a2-b2c3-d4e5",
            "attributes": {
              "enable_merge_fields": false,
              "trim_hidden_field_value": false,
              "enable_advanced_templating": false,
              "reset_value_on_new_repeat_entry": false
            },
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Hidden",
            "value": "You are a friendly voice assistant inside a form that helps the user find Salesforce account records and prevents duplicate account creation.\n\nYour tasks:\n1. Understand the latest user message in the conversation.\n2. If the user is searching for an account, find the best matching records from the existing records by name, phone or type and describe them briefly in agent_response, including name, phone and type of each match.\n3. If the user wants to create a new account, compare the provided name, phone and type against the existing records. Treat a record as a likely duplicate if it has a matching or very similar name, the same phone number, or the same name and type. If a likely duplicate exists, set duplicate_found to true, warn the user in agent_response, mention the matching record details and ask if they still want to continue. If no duplicate exists, set duplicate_found to false and confirm the details are filled in and the account looks safe to create.\n4. Extract the account name, phone and type from the conversation whenever they are mentioned.\n5. If required information is missing, ask the user for it in agent_response.\n\nRespond ONLY with a raw JSON object, no markdown, no code fences and no explanation, with exactly these keys: name as the extracted account name or an empty string, phone as the extracted phone number or an empty string, type as the extracted account type or an empty string, duplicate_found as true or false, and agent_response as a short natural spoken reply of at most two sentences that will be read aloud to the user. Keep agent_response conversational and brief, and word it slightly differently each time so it is never identical to your previous reply.",
            "name": "Hidden",
            "category": "input",
            "label": "AI Prefill Prompt",
            "icon": "/scripts/formbuilder/img/hidden.png",
            "component_id": "c4d5-e6f7-a8b9",
            "attributes": {
              "enable_merge_fields": false,
              "trim_hidden_field_value": false,
              "enable_advanced_templating": false,
              "reset_value_on_new_repeat_entry": false
            },
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "AI_Prefill",
            "name": "AI Prefill",
            "category": "media",
            "label": "Prefill Form Fields Through AI Prompt",
            "icon": "https://d3iyvxaud7i110.cloudfront.net/apps/builder/elements/ai_prefill.png",
            "version": "1",
            "attributes": {
              "prefill_mappings": [
                {
                  "form_field": "c008-764e-de46",
                  "object_field": "name",
                  "default_value": ""
                },
                {
                  "form_field": "daa5-7f5d-61aa",
                  "object_field": "phone",
                  "default_value": ""
                },
                {
                  "form_field": "d83a-2d46-6ec6",
                  "object_field": "type",
                  "default_value": ""
                },
                {
                  "form_field": "f1a2-b2c3-d4e5",
                  "object_field": "duplicate_found",
                  "default_value": ""
                },
                {
                  "form_field": "a1f2-b3c4-d5e6",
                  "object_field": "agent_response",
                  "default_value": ""
                }
              ],
              "ai_prompt": "{{c4d5-e6f7-a8b9}}\n\nExisting Salesforce account records:\n{{1459-a3cd-0021}}\n\nConversation so far as a JSON array, where type user is the person speaking and type assistant is you:\n{{ba64-55fc-9333}}",
              "repeat_prefill_field_id": "",
              "select_photo_fields": "",
              "disable_empty_field_prefill": true
            },
            "component_id": "da78-f3f8-f209",
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Text",
            "name": "Text",
            "category": "input",
            "label": "Name",
            "icon": "/scripts/formbuilder/img/text.png",
            "attributes": {
              "guide_url": "https://support.formyoula.com/guides/text-field",
              "readonly": "no",
              "field_label_position": "",
              "min_length": "",
              "max_length": "",
              "show_remaining_character_count": false
            },
            "component_id": "c008-764e-de46",
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Phone",
            "name": "Phone",
            "category": "input",
            "label": "Phone Field",
            "icon": "https://d3iyvxaud7i110.cloudfront.net/apps/builder/elements/phone.png",
            "attributes": {
              "allow_users_to_select_country": true,
              "default_country": "United States"
            },
            "component_id": "daa5-7f5d-61aa",
            "required": false
          },
          {
            "repeat_value": [],
            "components": [],
            "controlling_elements": [],
            "type": "Text",
            "name": "Text",
            "category": "input",
            "label": "Type",
            "icon": "/scripts/formbuilder/img/text.png",
            "attributes": {
              "guide_url": "https://support.formyoula.com/guides/text-field",
              "readonly": "no",
              "field_label_position": "",
              "min_length": "",
              "max_length": "",
              "show_remaining_character_count": false
            },
            "component_id": "d83a-2d46-6ec6",
            "required": false
          }
        ],
        "page_id": "baa3-b23f-e875",
        "title": "Fill Account Details",
        "page_index": 1,
        "component_count": null,
        "deployed": true
      }
    ],
    "owner_id": "6230635087cd9e8f340ad2be",
    "created_by_id": "6230635087cd9e8f340ad2be",
    "attributes": {}
  },
  "connections": []
}