MissionVisitNeedsToBeBilledv2.0.0
Event represents when a visit for a mission is completed and needs to be billed
Details
This event is emitted after a VisitDoneEvent has been enriched for a mission and is ready to be billed by the Billing Service.
It is consumed by the Billing Service through this event passed to alambda for invoicing creation.
Consumer / Producer Diagram
Event Example
MissionVisitNeedsToBeBilled Schema (json)
{
"version": "0",
"id": "676ddc84-11d2-587b-34a3-bb0d7c1ac7f3",
"detail-type": "MissionVisitNeedsToBeBilled",
"source": "flatsy.service.booking",
"account": "221760190323",
"time": "2023-04-13T07:37:58Z",
"region": "eu-west-3",
"resources": [],
"detail": {
"metadata": {
"application": "System",
"service": "flatsy.service.booking",
"actor": "System",
"actorID": "System",
"entity": "Visit",
"correlationID": "3112dbdd-74d1-60c3-be11-d50c6e744df2",
"entityID": "d8a310f2-76db-4472-b32c-03cda359b067"
},
"data": {
"mission": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": "2.0",
"type": "INVENTORY",
"state": "REQUESTED",
"propertyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": "2023-05-02T08:56:42.794Z",
"updatedAt": "2023-05-02T08:56:42.794Z",
"completedAt": "2023-05-02T08:56:42.794Z",
"inventory": {
"type": "ENTRY",
"preferredAt": "2023-05-02T08:56:42.794Z",
"visit": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"bookedAt": "2023-05-02T09:26:08.642Z"
},
"flatguide": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"staffedAt": "2023-05-02T08:56:42.794Z"
}
}
},
"property": {
"location": {
"latitude": 12.4,
"longitude": 12.4,
"countryCode": "FRA",
"postalCode": "75002",
"locality": "Paris",
"route": "rue d'Aboukir",
"streetAddress": "50 rue d'Aboukir",
"streetNumber": "50",
"entrance": "bte 2",
"unit": "Résidence les platanes",
"placeName": "Dumonceau",
"floorNumber": 3
},
"estateType": "HOUSE",
"publication": {
"reference": "XDr34"
},
"spaces": {
"residential": {
"livingSpace": 120
}
},
"structure": {
"rooms": {
"numberOfBedrooms": 1,
"numberOfRooms": 2
}
},
"isFurnished": true,
"heating": {
"energyEquipmentKind": "ELECTRICITY",
"isCommunal": true
},
"hotWater": {
"energyEquipmentKind": "ELECTRICITY",
"isCommunal": true
}
},
"visit": {
"id": "d8a310f2-76db-4472-b32c-03cda359b067",
"date": "2023-04-13T07:00:00Z",
"createdAt": "2023-04-07T12:48:23.419741Z",
"flatguideId": "2e6dde0c-536e-49b3-8603-175a345efff4",
"propertyVisits": [
{
"propertyId": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
"visitId": "d8a310f2-76db-4472-b32c-03cda359b067",
"comment": "Visite à blanc ",
"visitorInterest": 3,
"reportStatus": "reviewing",
"reportStatusUpdatedAt": "2023-04-13T07:37:46.127874Z",
"buyingMotive": "flatguide.report.visitor.buyingmotive.mainresidence"
}
],
"visitorVisits": [
{
"visitId": "d8a310f2-76db-4472-b32c-03cda359b067",
"askedPropertyId": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
"status": "visit.status.done",
"initialDate": "2023-04-13T07:00:00Z",
"visitor": {
"email": "hello-juliettemonier@flatsy.fr",
"firstName": "Juliette",
"lastName": "Monier",
"phone": "+33652047854",
"fields": {}
},
"statusUpdatedAt": "2023-04-13T07:37:48.347498Z",
"creator": "ByAgency"
}
],
"propertySummary": {
"id": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
"displayAddress": "132 Avenue Parmentier, 75011 Paris",
"ownerPictureUrl": "https://cdn.filestackcontent.com/o3ZMBnOzQ9yLKhSgiGfj?policy=eyJoYW5kbGUiOiJvM1pNQm5PelE5eUxLaFNnaUdmaiIsImNhbGwiOlsicmVhZCJdLCJleHBpcnkiOjQ2ODgzNjY4Njd9&signature=a3e983e6af0bbc19bb726c7977c63d0063440a0d5f4427877e60afeae3ac396e",
"latitude": 48.8686994,
"longitude": 2.372432599999999,
"externalRef": "949cbd",
"rentSell": "property.basics.rentsell.sell"
},
"durationMinutes": 45,
"metadata": { "dummy_visit": "true" }
},
"customer": {
"id": "f2bb4633-95ba-4e94-a53a-7986d7150a3d",
"name": "Hosman",
"isActive": true,
"segment": "customer.segment.agency.digital"
},
"correlationID": "3112dbdd-74d1-60c3-be11-d50c6e744df2",
"eventID": "3112dbdd-74d1-60c3-be11-d50c6e744df2"
}
}
}
Edit this pageLast updated on 2023/11/3
