# Trigger action on delete customer in backend

**URL:** <https://forum.shopware.com/t/trigger-action-on-delete-customer-in-backend/54644>\
**Category:** Programmierung\
**Created:** [16. August 2018 um 07:42 UTC](https://forum.shopware.com/t/trigger-action-on-delete-customer-in-backend/54644 "2018-08-16T07:42:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanRevet](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@JanRevet](https://forum.shopware.com/u/JanRevet)\
**Post date:** [16. August 2018 um 07:42 UTC](https://forum.shopware.com/t/trigger-action-on-delete-customer-in-backend/54644/1 "2018-08-16T07:42:11Z")

</div>

I am developing a plugin that links Shopware to e-mailing software. When a customer is deleted in the backend I would like to remove that person in the e-mailing software as well. The problem is that i can’t find an event to hook my controller to. It works when new customers are created or updated, but not when deleted. What I have is this:

```
 public static function getSubscribedEvents() { return ['Enlight\_Controller\_Action\_PreDispatch\_Backend\_Customer' =\> 'updateContact',]; } 

```

But it does not trigger on delete. Could anyone point me in the right direction? Many thanks in advance!

&nbsp;

---

<div class="post-metadata">

**Author:** ![BestShopPossible](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@BestShopPossible](https://forum.shopware.com/u/BestShopPossible)\
**Post date:** [16. August 2018 um 10:59 UTC](https://forum.shopware.com/t/trigger-action-on-delete-customer-in-backend/54644/2 "2018-08-16T10:59:20Z")

</div>

> <https://github.com/shopware/shopware/blob/5.4/engine/Shopware/Controllers/Backend/Customer.php#L336>

---

<div class="post-metadata">

**Author:** ![karlharris](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@karlharris](https://forum.shopware.com/u/karlharris)\
**Post date:** [16. August 2018 um 18:15 UTC](https://forum.shopware.com/t/trigger-action-on-delete-customer-in-backend/54644/3 "2018-08-16T18:15:06Z")

</div>

A Doctrine LifecycleEvent should be triggered on delete a customer:&nbsp;[https://developers.shopware.com/developers-guide/models/#remove-event](https://developers.shopware.com/developers-guide/models/#remove-event)
