def METHOD_NAME(self, alert, query, user, new_state, app, host, metadata, options):
    # Documentation: https://developer.webex.com/docs/api/guides/cards
    query_link = f"{host}/queries/{query.id}"
    alert_link = f"{host}/alerts/{alert.id}"
    if new_state == Alert.TRIGGERED_STATE:
        subject = alert.custom_subject or f"{alert.name} just triggered"
    else:
        subject = f"{alert.name} went back to normal"
    attachments = self.formatted_attachments_template(
        subject=subject, description=alert.custom_body, query_link=query_link, alert_link=alert_link
    )
    template_payload = {"markdown": subject + "\n" + alert.custom_body, "attachments": attachments}
    headers = {"Authorization": f"Bearer {options['webex_bot_token']}"}
    api_destinations = {
        "toPersonEmail": options.get("to_person_emails"),
        "roomId": options.get("to_room_ids"),
    }
    for payload_tag, destinations in api_destinations.items():
        if destinations is None:
            continue
        # destinations is guaranteed to be a comma-separated string
        for destination_id in destinations.split(","):
            payload = deepcopy(template_payload)
            payload[payload_tag] = destination_id
            self.post_message(payload, headers)