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:
{<br /> "charts": [<br /> {<br /> "header": "My Alert",<br /> "user_segment_idx": "1",<br /> "segment_value_label": null,<br /> "what_happened": "2022-10-13 14:00:00: 44.4 is lower than the threshold 55.0.",<br /> "chart_url": "https://analytics.amplitude.com/mychart?source=custom_monitor_webhook",<br /> "rca_url": "https://analytics.amplitude.com/mychart?source=custom_monitor_email&RCA.time=2022-10-13T14%3A00%3A00",<br /> "filename": "filename.png",<br /> "contentType": "image/png",<br /> "cid": "12345",<br /> "metric": "chart_monitor_metric",<br /> "change_str": 19,<br /> "direction": false,<br /> "image_url": "https://bosch-images.s3-us-west-2.amazonaws.com/public/image.png",<br /> "anomaly_label": {<br /> "segment": "1",<br /> "value": null<br /> },<br /> "anomaly_message": "2022-10-13 14:00:00: 44.4 is lower than the threshold 55.0."<br /> },