# How to configure API when discarding the changes for modal box in consultation

**URL:** <https://forums.pega.com/t/how-to-configure-api-when-discarding-the-changes-for-modal-box-in-consultation/13939>\
**Category:** General\
**Created:** [November 4, 2026, 10:54am UTC](https://forums.pega.com/t/how-to-configure-api-when-discarding-the-changes-for-modal-box-in-consultation/13939 "2026-11-04T10:54:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AvinashG2378](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@AvinashG2378](https://forums.pega.com/u/AvinashG2378)\
**Post date:** [November 4, 2026, 10:54am UTC](https://forums.pega.com/t/how-to-configure-api-when-discarding-the-changes-for-modal-box-in-consultation/13939/1 "2026-11-04T10:54:45Z")

</div>

When discarding the modal box we have to implement the API in consultation, flow action is not able to see when changes are discarded.

---

<div class="post-metadata">

**Author:** ![Sairohith](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sairohith/32/23362_2.png) [@Sairohith](https://forums.pega.com/u/Sairohith)\
**Post date:** [November 26, 2026, 7:54pm UTC](https://forums.pega.com/t/how-to-configure-api-when-discarding-the-changes-for-modal-box-in-consultation/13939/2 "2026-11-26T19:54:27Z")

</div>

In Pega Constellation, the default Discard button is handled by the UI framework, so the Flow Action post-processing activity will not be triggered. There is no standard configuration to invoke an API when changes are discarded. As a workaround, you can create a custom DX component with a Discard button and configure it to trigger the required REST API through a supported backend service. Once the API call is successful, close the modal using the supported cancellation action. Make sure the discarded changes are not saved to the case. I would recommend checking the supported extension points in your Pega version before implementing this approach
