Auto-increment (Firebase)


How can you setup autoincrement on firebase?
If I have an order and I am offline I want the order to sync when there is signal and only let firebase give a order number ensuring there is no clash of order numbers.

Please let me know if this is possible?