Update Customer’s profile
Use this API to update customer’s profile and then receive new recommendations, propensity scores,… For example, the client changes his address or answers to a question, The API will suggest you new recommendations based on this updated data.
The updated data will keep only during the client session (a specific customer, and an advisor during a customizable time). |
Query parameters
Name | Required | Description |
---|---|---|
fields |
Optional |
to specify the datas you want in the response* |
max_life_events |
Optional |
Max number of life events returned by product |
max_selling_points |
Optional |
Max number of selling points returned by life event |
*Possible to select multiple values: warnings, product_family_appeals, recommendations, product_propensities |
Query body (example)
{
"external_id": "1234567T",
"patches": [ (1)
//Change data on client's profile
// path field must start with "/"
{
"op": "replace",
"path": "/salary",
"value": 50000
},
{
"op": "add",
"path": "/new_field",
"value": "value"
},
{
"op": "remove",
"path": "/field"
}
],
"answers": [ (2)
{
//question id available on recommandation API
"question_id": "8D2FD3E4-2184-44FC-AE7D-5A59393D57AA",
"value": "Yes"
}
],
"feedbacks": [ (3)
{
"selling_point_id": "E717597C-252D-4137-981D-247D9D88027A",
"displayed_illustration": "Lorem ipsum…",
"value": "positive",
"prediction_id": "A8A42EBD-2684-4281-A6B4-C70EF7C88F09"
}
],
"decisions": [ (4)
{
"product_id": "UUID of the product for which you want to submit a decision",
"value": "ACCEPTED" | "DECLINED" | "MEETING"
},
... other decisions for other products
]
}
1 | Array of JSON Patch operations |
2 | Save an client’s answer |
3 | Save a feedback on a selling point |
4 | Save a decision - quote/no quote |
Example response
{
"id": "uuid",
"external_id": "12345",
"opportunities": [
// A sorted array of opportunities. Each opportunity contains a life event and a list of recommandations
{
"id": "uuid",
"life_event": {
"id": "uuid",
"resource_id": "uuid",
"title": "<p>Enjoying family time in your house?</p>",
"image_url": "https://www.zelros.com/",
"product_settings": [
{
"id": "uuid",
"url": null,
"additional_info": null
}
]
},
//a sorted array of recommendations (for each product eligible product)
"recommendations": [
{
"id": "uuid",
"product": {
"id": "6a5f6359-4876-4002-8d93-88466f324bc6",
"catalog_id": "uuid",
"external_id": "LIFE_ACCIDENT",
"name": "Life Accident",
"groups": [
{
"id": "uui",
"catalog_id": "uuid",
"name": "Person"
}
],
"decision": {
"objection": {
"reasons": []
}
}
},
//a sorted array of Selling Points
"selling_points": [
{
"id": "uuid",
"resource_id": "uuid",
"title": "Life Accident",
"illustration": "<p>Do you know that 73% of accident happen at home in gardens? </p>",
"feedback": null,
"enunciation": null,
"prediction_id": null,
"limitation": null
}
],
"questions": [],
//Notification if an advisor has already done a quote for this client
"decision": {
"id": "uuid",
//Possible Value ACCEPTED DECLINED MEETING
"value": "ACCEPTED",
"created_at": "2021-12-22T15:44:41.496Z",
"updated_at": "2021-12-22T15:44:41.496Z",
"created_by": "4eede3a9-80ff-45cf-b349-182634098854",
"objection": null
},,
"propensity": {
"product": {
"catalog_id": "uuid"
},
"prediction": null,
"percentage": null
}
},
{
"id": "uuid",
"product": {
"id": "uuid",
"catalog_id": "uuid",
"external_id": "HEALTH",
"name": "Health",
"groups": [
{
"id": "uui",
"catalog_id": "uuid",
"name": "Person"
}
],
"decision": {
"objection": {
"reasons": []
}
}
},
"selling_points": [],
"questions": [],
"decision": null,
"propensity": {
"product": {
"catalog_id": "uuid"
},
"prediction": null,
"percentage": null
}
}
]
},
{
"id": "uuid",
"life_event": {
"id": "0e80c8ab-f648-47bc-9518-539b884d1419",
"resource_id": "5e90c3a7-5d21-439d-b348-3a12d9b014e8",
"title": "<p>5 °C in your area starts to be cold!</p>",
"image_url": null,
"product_settings": [
{
"id": "uuid",
"url": null,
"additional_info": null
}
]
},
"recommendations": [
{
"id": "uui",
"product": {
"id": "uuid",
"catalog_id": "uuid",
"external_id": "LIFE_ACCIDENT",
"name": "Life Accident",
"groups": [
{
"id": "uui",
"catalog_id": "uuid",
"name": "Person"
}
],
"decision": {
"objection": {
"reasons": []
}
}
},
"selling_points": [
{
"id": "uuid",
"resource_id": "uuid",
"title": "Cold outside - Rural area",
"illustration": "<p>Be careful outside. Driving on icy roads is a major source of personal injuries.</p>",
"feedback": null,
"enunciation": null,
"prediction_id": null,
"limitation": null
}
],
"questions": [],
"decision": null,
"propensity": {
"product": {
"catalog_id": "uuid"
},
"prediction": null,
"percentage": null
}
}
]
}
],
//deprecated
"recommendations": [
{
"id": "uuid",
"product": {
"id": "6a5f6359-4876-4002-8d93-88466f324bc6",
"external_id": "LIFE_ACCIDENT",
"name": "Life Accident"
},
"percentage": null,
"contextual_info": {
"id": "uuid",
"label": "<p>Enjoying family time in your house?</p>",
"additional_info": null
},
"selling_points": [
{
"id": "uuid",
"illustration": "<p>Do you know that 73% of accident happen at home in gardens? </p>",
"label": "Life Accident",
"limitation": null
}
],
"questions": []
},
{
"id": "uuid",
"product": {
"id": "uuid",
"external_id": "HEALTH",
"name": "Health"
},
"percentage": null,
"contextual_info": {
"id": "uuid",
"label": "<p>Enjoying family time in your house?</p>",
"additional_info": null
},
"selling_points": [],
"questions": []
}
],
"warnings": [
{
"id": "uuid",
"name": "WA_MMT_CHT_VEHICULE",
"message": "MOMENT VIE changement véhicule"
},
{
"id": "uuid",
"name": "WA_MMT_DEMENAGMT",
"message": "MOMENT VIE déménagement"
}
],
"product_group_propensities": [
{
"group": {
"catalog_id": "uuid",
"name": "Mobility"
},
"prediction": null,
"percentage": null
},
{
"group": {
"catalog_id": "uuid",
"name": "Person"
},
"prediction": {
"score": 0.7776366670926412,
"cluster_mean_score": 0.8192509353160858,
"cluster_lift": 7.509740698985345
},
"percentage": 0.8192509353160858
},
{
"group": {
"catalog_id": "uuid",
"name": "Saving"
},
"prediction": {
"score": 0.6977,
"cluster_mean_score": 0.8192509353160858,
"cluster_lift": 7.509740698985345
},,
"percentage": 0.6977
}
],
//Propensity score (for this client and this product)
"product_propensities": [
{
"product": {
"catalog_id": "uuid"
},
"prediction": {
"score": 0.7776366670926412,
"cluster_mean_score": 0.8192509353160858,
"cluster_lift": 7.509740698985345
},
"percentage": 0.8192509353160858
}
],
//Client profil (example)
"profile": {
"person_id": "uuid",
"is_client": 0,
"age": 66.67,
"sex": "M",
"socio_occupational_group": "6",
"id": "uuid",
"zipcode": "31430",
"socio_occupational_category": "62",
"seniority": 41.333333333333336,
"tenant_owner": "OWNER",
"family": {
"id": "57E110B36155E7D200A8A24065202DFC3BDB4B26",
"members": [
{
"_id": "6154a4c8d5bc229fcd97ab22",
"person_id": "uuid",
"is_client": 0,
"age": 66.67,
"sex": "M",
"socio_occupational_group": "6",
"id": "uuid",
"zipcode": "31430",
"socio_occupational_category": "62",
"seniority": 41.333333333333336,
"tenant_owner": "OWNER",
"family": {
"id": "uuid",
"members": [
{
"person_id": "uuid"
}
]
},
"contracts": [
{
"id": "uuid",
"product_id": "HOME",
"effective_date": "2013-11-01T00:00:00",
"amount": 33.75,
"formula_id": "4",
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "CAR",
"effective_date": "2019-05-28T00:00:00",
"amount": 8.25,
"formula_id": "2",
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "CAR",
"effective_date": "2013-11-01T00:00:00",
"amount": 26,
"formula_id": "5",
"options": [
"option_assistance"
],
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "HEALTH",
"effective_date": "2014-01-01T00:00:00",
"amount": 72.66666666666667,
"formula_id": "S",
"_uniq_id": "uuid"
}
],
"homes": [
{
"nature": "M",
"nb_rooms": 3,
"quality": "PRO ",
"zipcode": "76490"
}
],
"cars": [
{
"first_registration_date": "2001-03-01T00:00:00",
"type": "30",
"parking_zipcode": "76940"
}
]
},
{
"_id": "uuid",
"person_id": "uuid",
"is_client": 0,
"age": 62,
"sex": "F",
"socio_occupational_group": "8",
"id": "uuid",
"zipcode": "61150",
"socio_occupational_category": "85",
"seniority": 41.333333333333336,
"tenant_owner": "TENANT",
"family": {
"id": "uuid",
"members": [
{
"person_id": "uuid"
}
]
},
"quotes": [
{
"id": "uuid",
"product_id": "HOME",
"date": "2021-06-16T00:00:00",
"status": "C",
"amount": "",
"formula_name": ""
}
],
"contracts": [
{
"id": "uuid",
"product_id": "CAR",
"effective_date": "2019-11-01T00:00:00",
"amount": 39.333333333333336,
"formula_id": "7",
"options": [
"option_assistance",
"option_lower_sales_price"
],
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "HOME",
"effective_date": "2021-07-01T00:00:00",
"amount": 19.75,
"formula_id": "2",
"_uniq_id": "uuid"
}
],
"homes": [
{
"nature": "A",
"nb_rooms": 2,
"quality": "LOC ",
"zipcode": "76490"
}
],
"cars": [
{
"first_registration_date": "2012-03-01T00:00:00",
"type": "28",
"parking_zipcode": "76940"
}
]
}
]
},
"contracts": [
{
"id": "uuid",
"product_id": "HOME",
"effective_date": "2013-11-01T00:00:00",
"amount": 33.75,
"formula_id": "4",
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "CAR",
"effective_date": "2019-05-28T00:00:00",
"amount": 8.25,
"formula_id": "2",
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "CAR",
"effective_date": "2013-11-01T00:00:00",
"amount": 26,
"formula_id": "5",
"options": [
"option_assistance"
],
"_uniq_id": "uuid"
},
{
"id": "uuid",
"product_id": "HEALTH",
"effective_date": "2014-01-01T00:00:00",
"amount": 72.66666666666667,
"formula_id": "S",
"_uniq_id": "uuid"
}
],
"homes": [
{
"nature": "M",
"nb_rooms": 3,
"quality": "PRO ",
"zipcode": "76490"
}
],
"cars": [
{
"first_registration_date": "2001-03-01T00:00:00",
"type": "30",
"parking_zipcode": "76940"
}
],
"_last_update": "2021-12-02T10:25:40.859Z",
"_create_date": "2021-09-29T17:39:20.225Z",
"climaterisk_level": "HIGH",
"climaterisk_types": "DROUGHT",
"rural_urban": "rural",
"weather_text": "Mostly cloudy",
"weather_temperature": 5,
"weather_metric": "C"
}
}