I have a webhook set up to receive Amplitude alerts. When an alert fires, my webhook receives a notification as expected. On the incoming request, I can’t find the name of the user segment that’s getting alerted. This would especially be helpful in charts with multiple segments. I do see a user_segment_idx field that contains a number, presumably the index into the list of segments. Is there a way to lookup the name of the segment? Can this be done with an API call? Here’s a snippet of the incoming JSON payload for reference:
{
"charts": r
{
"header": "My Alert",
"user_segment_idx": "1",
"segment_value_label": null,
"what_happened": "2022-10-13 14:00:00: 44.4 is lower than the threshold 55.0.",
"chart_url": "https://analytics.amplitude.com/mychart?source=custom_monitor_webhook",
"rca_url": "https://analytics.amplitude.com/mychart?source=custom_monitor_email&RCA.time=2022-10-13T14%3A00%3A00",
"filename": "filename.png",
"contentType": "image/png",
"cid": "12345",
"metric": "chart_monitor_metric",
"change_str": 19,
"direction": false,
"image_url": "https://bosch-images.s3-us-west-2.amazonaws.com/public/image.png",
"anomaly_label": {
"segment": "1",
"value": null
},
"anomaly_message": "2022-10-13 14:00:00: 44.4 is lower than the threshold 55.0."
},