<p>You can write a <a href="http://pluginfactory.io" rel="nofollow noreferrer">Craft plugin</a> that listens to the <a href="https://craftcommerce.com/docs/events-reference#commerce_orders.onbeforeordercomplete" rel="nofollow noreferrer">onBeforeOrderComplete</a> event and implement whatever sort of order number format your business requirements require.</p>

<p>Alternatively here's an existing plugin that uses that method that might already cover your needs: <a href="https://github.com/bossanova808/CommerceFriendlyOrderNumbers" rel="nofollow noreferrer">https://github.com/bossanova808/CommerceFriendlyOrderNumbers</a> </p>

CC BY-SA 3.0
2016-11-10T21:42:58.723Z
Sorry Brad just to check is there no way to just skip the the ID of craft_commerce_orders DB table on to for example 2000 as a starting point?
Green17
CC BY-SA 3.0
2016-11-10T22:10:16.237Z
@Green17 the order ID is not incremental. It is the next Craft element ID. Elements in Craft are entries, categories, products, orders etc. So there is no way to make `order.id` incremental. Best using a custom field with the plugin brad mentioned.
Luke Holder
CC BY-SA 3.0
2016-11-10T22:41:36.967Z
@Green17 my plugin (above) will do exactly what you want - you can start at 2000 (or any number) and you'll get consecutive numbers from them on.  We're about to clear the first 1000 orders with it (starting at ~25000 from our old cart) - so pretty confident it works well at this point.  It's pretty easy to implement but if you get stuck find me on slack and I'll help you out.
Jeremy Daalder
CC BY-SA 3.0
2016-11-10T22:51:04.100Z
Thanks so much for all you help, I will use you plugin Jeremy.
Green17
CC BY-SA 3.0
2016-11-14T14:45:23.600Z
@JeremyDaalder your plugin worked great thanks so much for your and Brads help.
Green17
CC BY-SA 3.0
2016-11-10T21:26:18.843Z
2016-11-10T21:26:18.843Z
Brad Bell
<p>Is there a easy way to start Craft Commerce order ids form a higher number?
So the can follow on from an old system and not overlap?</p>

<p>autoincrement in the DB table maybe?</p>

<plugin-craftcommerce>
Craft Commerce starting order ids form a higher number?
# Craft Commerce starting order ids form a higher number?

(Asked by: username_0 on 2016-11-10)

Is there a easy way to start Craft Commerce order ids form a higher number?
So the can follow on from an old system and not overlap?

autoincrement in the DB table maybe?

**Tags:** plugin-craftcommerce

---

## 1 answers

### Answer by username_1 on 2016-11-10. Score: 0 | Accepted answer

You can write a [Craft plugin](http://pluginfactory.io) that listens to the [onBeforeOrderComplete](https://craftcommerce.com/docs/events-reference#commerce_orders.onbeforeordercomplete) event and implement whatever sort of order number format your business requirements require.

Alternatively here's an existing plugin that uses that method that might already cover your needs: <https://github.com/bossanova808/CommerceFriendlyOrderNumbers>

> **Comments:**
> **username_0**: Sorry Brad just to check is there no way to just skip the the ID of craft_commerce_orders DB table on to for example 2000 as a starting point?  
> **username_2**: @Green17 the order ID is not incremental. It is the next Craft element ID. Elements in Craft are entries, categories, products, orders etc. So there is no way to make `order.id` incremental. Best using a custom field with the plugin brad mentioned.  
> **username_3**: @Green17 my plugin (above) will do exactly what you want - you can start at 2000 (or any number) and you'll get consecutive numbers from them on.  We're about to clear the first 1000 orders with it (starting at ~25000 from our old cart) - so pretty confident it works well at this point.  It's pretty easy to implement but if you get stuck find me on slack and I'll help you out.  
> **username_0**: Thanks so much for all you help, I will use you plugin Jeremy.  
> **username_0**: @JeremyDaalder your plugin worked great thanks so much for your and Brads help.  

---

