# GDPR Delete orders

**URL:** <https://forum.litium.com/t/gdpr-delete-orders/78>\
**Category:** Questions\
**Tags:** gdpr\
**Created:** [May 16, 2018, 9:43am UTC](https://forum.litium.com/t/gdpr-delete-orders/78 "2018-05-16T09:43:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonas.olsson](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonas.olsson/32/177_2.png) [@jonas.olsson](https://forum.litium.com/u/jonas.olsson)\
**Post date:** [May 16, 2018, 9:43am UTC](https://forum.litium.com/t/gdpr-delete-orders/78/1 "2018-05-16T09:43:08Z")

</div>

Two questions concerning section “Delete orders” in this page [https://docs.litium.com/documentation/architecture/gdpr-support](https://docs.litium.com/documentation/architecture/gdpr-support)

Text says “Historical orders can be deleted automatically”, is this a scheduled task or how do we set up this? (or do you mean it is “automatically” deleted when clicking button to delete in control panel)

When deleting orders, will also connected persons in Relations be deleted (if such connection exists)?

Litium version: 4.8.9

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 16, 2018, 9:52am UTC](https://forum.litium.com/t/gdpr-delete-orders/78/2 "2018-05-16T09:52:00Z")

</div>

Setup is avaliable in control panel:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/9e84edf743843536eac45d5326ba7040f8823ac8.png)  
(image from L6 but should look similar in 4.8)

This delete does not delete the customer.

---

<div class="post-metadata">

**Author:** ![ton.nguyen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ton.nguyen/32/989_2.png) [@ton.nguyen](https://forum.litium.com/u/ton.nguyen)\
**Post date:** [May 17, 2018, 7:01am UTC](https://forum.litium.com/t/gdpr-delete-orders/78/3 "2018-05-17T07:01:09Z")

</div>

And yes it is a scheduled task

---

<div class="post-metadata">

**Author:** ![jonas.olsson](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonas.olsson/32/177_2.png) [@jonas.olsson](https://forum.litium.com/u/jonas.olsson)\
**Post date:** [May 17, 2018, 2:49pm UTC](https://forum.litium.com/t/gdpr-delete-orders/78/4 "2018-05-17T14:49:28Z")

</div>

Ok, thanks!  
But when orders are deleted by scheduled task we will still store personal information for customers on those orders?  
Don’t you agree that customer info should also be removed?  
Or should this be a separate task?

---

<div class="post-metadata">

**Author:** ![anusha.ganegoda](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/anusha.ganegoda/32/58_2.png) [@anusha.ganegoda](https://forum.litium.com/u/anusha.ganegoda)\
**Post date:** [May 17, 2018, 4:09pm UTC](https://forum.litium.com/t/gdpr-delete-orders/78/5 "2018-05-17T16:09:00Z")

</div>

You may extend to delete the personal info.

If customer info should be removed, it is best to remove from the customer.

The order delete is a requirement in GDPR that says we should not keep data that is too old.,

But the customer may have newer orders.

One improvement would be, to delete the customer also if there are no new orders.

---

<div class="post-metadata">

**Author:** ![jonas.olsson](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonas.olsson/32/177_2.png) [@jonas.olsson](https://forum.litium.com/u/jonas.olsson)\
**Post date:** [May 18, 2018, 5:31am UTC](https://forum.litium.com/t/gdpr-delete-orders/78/6 "2018-05-18T05:31:00Z")

</div>

Ok, how do I extend to delete personal info?

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [May 18, 2018, 9:40am UTC](https://forum.litium.com/t/gdpr-delete-orders/78/7 "2018-05-18T09:40:57Z")

</div>

> **[Customizing the GDPR features](https://docs.litium.com/documentation/litium-platform/gdpr-support/customizing-the-gdpr-features)**
>
> Customizing the GDPR features

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 21, 2018, 12:11pm UTC](https://forum.litium.com/t/gdpr-delete-orders/78/8 "2018-05-21T12:11:09Z")

</div>

The scheduled task that delete orders cannot be extended.

But you could

1. Create a new scheduled task that regularly deletes all customers that do not have any orders.
2. Add a listener to the event `ModuleECommerce.Instance.EventManager.OrderDeleted` and if the deleted order is the only one the customer has then also delete the customer.
