{
    "id": "20260318_135556_ae7d168d",
    "timestamp": "2026-03-18T13:55:56+00:00",
    "meta": {
        "method": "POST",
        "uri": "/trudel/SB/FinDeVisite.php?action=create_all",
        "query": {
            "action": "create_all"
        },
        "ip": "142.118.112.73",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",
        "http_code": 200,
        "note": "create_all",
        "OpportunityId": "006As00000Njh5BIAR",
        "VisitId": "a03As00000yMjdaIAC"
    },
    "input": {
        "Agent": {
            "FirstName": "Yannick",
            "LastName": "Gilbert",
            "Email": "yannick@minuitmoinsune.com",
            "Job": "Développeur"
        },
        "Clients": [
            {
                "FirstName": "Camille",
                "LastName": "Durand",
                "Email": "camille.durand@example.com",
                "Phone": "514-777-4455",
                "Post": "H2L 3A6"
            },
            {
                "FirstName": "Louis",
                "LastName": "Martel",
                "Email": "louis.martel@example.com",
                "Phone": "438-654-9922",
                "Post": "H3Z 1A5"
            }
        ],
        "Projects": [
            {
                "ProjectName": "Esplanade Cartier - Phase 1",
                "Favorites": {
                    "Units": [
                        "203",
                        "305",
                        "402"
                    ]
                },
                "Estimates": [
                    {
                        "Unit": "203",
                        "FinalPrice": 1920,
                        "ServicesAndOptionsIncluded": [
                            "Internet",
                            "Chauffage"
                        ],
                        "ServicesAndOptions": [
                            {
                                "Name": "Stationnement",
                                "Price": 100
                            }
                        ],
                        "ServicesAndOptionsMultiple": []
                    },
                    {
                        "Unit": "305",
                        "FinalPrice": 2200,
                        "ServicesAndOptionsIncluded": [
                            "Climatisation"
                        ],
                        "ServicesAndOptions": [],
                        "ServicesAndOptionsMultiple": [
                            {
                                "Name": "Rangement",
                                "Number": 2,
                                "Price": 80
                            }
                        ]
                    }
                ]
            }
        ],
        "GeneralInfo": {
            "Date": "2026-03-18",
            "MeetingDateTime": "2026-03-18T13:55:07Z",
            "VisitTime": 52,
            "WalkIn": false,
            "VisitedUnitRecordTypeDeveloperName": "Default",
            "Building": "Bâtiment A",
            "UnitsSeeked": [
                "3.5",
                "4.5",
                "Studio"
            ],
            "Comment": "Visite test (UI) - création Visit__c + Visited_Unit__c",
            "VisitedUnits": [
                {
                    "Unit": "203",
                    "ClientInterest": "High",
                    "TypeDeVisite": "Visite",
                    "Notes": "Beau plan, bon prix.",
                    "Comments": "<p>Client très intéressé.</p>",
                    "PositiveAspects": [
                        "Luminosité",
                        "Vue"
                    ],
                    "NegativeAspects": [
                        "Bruit"
                    ]
                },
                {
                    "Unit": "305",
                    "ClientInterest": "Medium",
                    "TypeDeVisite": "Visite",
                    "Notes": "À revoir avec conjoint."
                }
            ]
        }
    },
    "output": {
        "ok": true,
        "LeadConversion": null,
        "Opportunity": {
            "http": null,
            "resp": null,
            "id": "006As00000Njh5BIAR"
        },
        "Roles": [
            {
                "http": 200,
                "resp": {
                    "id": "00KAs00000dEetZMAS",
                    "alreadyExists": true
                },
                "role": {
                    "ContactId": "003As00000yMCQfIAO",
                    "Role": "Client principal",
                    "IsPrimary": true
                }
            },
            {
                "http": 200,
                "resp": {
                    "id": "00KAs00000dEevBMAS",
                    "alreadyExists": true
                },
                "role": {
                    "ContactId": "003As00000yMWSCIA4",
                    "Role": "Client secondaire",
                    "IsPrimary": false
                }
            }
        ],
        "Visit__c": {
            "mode": "update",
            "id": "a03As00000yMjdaIAC",
            "http": 204,
            "payload": {
                "Opportunity__c": "006As00000Njh5BIAR",
                "Contact_1__c": "003As00000yMCQfIAO",
                "Contact_2__c": "003As00000yMWSCIA4",
                "Meeting_Date_Time__c": "2026-03-18T13:55:07Z",
                "Meeting_Notes__c": "Visite test (UI) - création Visit__c + Visited_Unit__c",
                "Visit_Duration__c": 52,
                "Walk_in__c": false
            }
        },
        "Visited_Unit__c": [
            {
                "ok": false,
                "unit": "203",
                "http": 400,
                "res": [
                    {
                        "message": "Type de visite: bad value for restricted picklist field: Visite",
                        "errorCode": "INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST",
                        "fields": [
                            "Type_de_visite_c__c"
                        ]
                    }
                ]
            },
            {
                "ok": false,
                "unit": "305",
                "http": 400,
                "res": [
                    {
                        "message": "Type de visite: bad value for restricted picklist field: Visite",
                        "errorCode": "INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST",
                        "fields": [
                            "Type_de_visite_c__c"
                        ]
                    }
                ]
            }
        ]
    }
}