I've been digging around in the database and the web trying to determine how this numbering system works.

I see that sales_flat_invoice.increment_id has the following information:

`increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',

It is stored as a string and has no auto_increment value applied to it. I'm trying to determine how Magento really determines what value goes into this field. There were some articles stating that the value comes from eav_entity_store.increment_last_id but that doesn't line up with my current numbering sequence. increment_last_id matches my current orders but does not match the most recent sfi.increment_id.

1 Answer 1


The increment id is build from the value stored in eav_entity_store, here you can find thw last id used per entity type


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.