sales_order table - increment_id doesn't match entity_id
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
I'm unsure whether they should match or not, I haven't been able to find a definitive answer yet.
The start of sales_order
table looks fine:
But suddenly the increment_id
column stopped matching the entity_id
column:
The invoice IDs still match, sales_invoice
table:
But maybe that's because we only have 103 invoices, whereas we have 270 orders. The IDs in the order table started to get out of sync at order 173.
Any help is greatly appreciated. We have multiple third party integrations, some of them use entity_id
and some increment_id
, so it gets very confusing.
magento2
add a comment |Â
up vote
2
down vote
favorite
I'm unsure whether they should match or not, I haven't been able to find a definitive answer yet.
The start of sales_order
table looks fine:
But suddenly the increment_id
column stopped matching the entity_id
column:
The invoice IDs still match, sales_invoice
table:
But maybe that's because we only have 103 invoices, whereas we have 270 orders. The IDs in the order table started to get out of sync at order 173.
Any help is greatly appreciated. We have multiple third party integrations, some of them use entity_id
and some increment_id
, so it gets very confusing.
magento2
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm unsure whether they should match or not, I haven't been able to find a definitive answer yet.
The start of sales_order
table looks fine:
But suddenly the increment_id
column stopped matching the entity_id
column:
The invoice IDs still match, sales_invoice
table:
But maybe that's because we only have 103 invoices, whereas we have 270 orders. The IDs in the order table started to get out of sync at order 173.
Any help is greatly appreciated. We have multiple third party integrations, some of them use entity_id
and some increment_id
, so it gets very confusing.
magento2
I'm unsure whether they should match or not, I haven't been able to find a definitive answer yet.
The start of sales_order
table looks fine:
But suddenly the increment_id
column stopped matching the entity_id
column:
The invoice IDs still match, sales_invoice
table:
But maybe that's because we only have 103 invoices, whereas we have 270 orders. The IDs in the order table started to get out of sync at order 173.
Any help is greatly appreciated. We have multiple third party integrations, some of them use entity_id
and some increment_id
, so it gets very confusing.
magento2
magento2
asked 4 hours ago
VirtusB
388
388
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
increment_id
and entity_id
are two different elements at magento2.
entity_id
is the primary key of the table which auto increment.
Where increment_id
an unique identifier of an order which using build on some logic.
Like
Prefix
Suffix
Step
Start-value
Pad-length
That it logic is build at Magento_SalesSequence
module. Please check more detail at https://www.classyllama.com/blog/m2-incrementid
Thanks, Amit. So if an API usesentity_id
that is bad, correct? They should switch toincrement_id
? Do you know ifentity_id
should matchincrement_id
?
– VirtusB
3 hours ago
use ofentity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api
– Amit Bera♦
3 hours ago
add a comment |Â
up vote
0
down vote
Good day, your EntityID doesnt have to match your OrderID.
Your Ordernumbers are out of sync because of the quotation system behind magento. For every order a customer wants to make a quote gets created in your database and potentually reserving an ordernumber. Thats why the ordernumbers jump ( Invoice numbers wont jump ).
You can check that yourself on that MySql table:
quote
I hope i could help you with that :)
Hi. Inquote
I have 474 rows, and onlyentity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently theentity_id
is four numbers behindincrement_id
in thesales_order
table.
– VirtusB
3 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
increment_id
and entity_id
are two different elements at magento2.
entity_id
is the primary key of the table which auto increment.
Where increment_id
an unique identifier of an order which using build on some logic.
Like
Prefix
Suffix
Step
Start-value
Pad-length
That it logic is build at Magento_SalesSequence
module. Please check more detail at https://www.classyllama.com/blog/m2-incrementid
Thanks, Amit. So if an API usesentity_id
that is bad, correct? They should switch toincrement_id
? Do you know ifentity_id
should matchincrement_id
?
– VirtusB
3 hours ago
use ofentity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api
– Amit Bera♦
3 hours ago
add a comment |Â
up vote
4
down vote
accepted
increment_id
and entity_id
are two different elements at magento2.
entity_id
is the primary key of the table which auto increment.
Where increment_id
an unique identifier of an order which using build on some logic.
Like
Prefix
Suffix
Step
Start-value
Pad-length
That it logic is build at Magento_SalesSequence
module. Please check more detail at https://www.classyllama.com/blog/m2-incrementid
Thanks, Amit. So if an API usesentity_id
that is bad, correct? They should switch toincrement_id
? Do you know ifentity_id
should matchincrement_id
?
– VirtusB
3 hours ago
use ofentity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api
– Amit Bera♦
3 hours ago
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
increment_id
and entity_id
are two different elements at magento2.
entity_id
is the primary key of the table which auto increment.
Where increment_id
an unique identifier of an order which using build on some logic.
Like
Prefix
Suffix
Step
Start-value
Pad-length
That it logic is build at Magento_SalesSequence
module. Please check more detail at https://www.classyllama.com/blog/m2-incrementid
increment_id
and entity_id
are two different elements at magento2.
entity_id
is the primary key of the table which auto increment.
Where increment_id
an unique identifier of an order which using build on some logic.
Like
Prefix
Suffix
Step
Start-value
Pad-length
That it logic is build at Magento_SalesSequence
module. Please check more detail at https://www.classyllama.com/blog/m2-incrementid
edited 3 hours ago
answered 3 hours ago


Amit Bera♦
55k1367160
55k1367160
Thanks, Amit. So if an API usesentity_id
that is bad, correct? They should switch toincrement_id
? Do you know ifentity_id
should matchincrement_id
?
– VirtusB
3 hours ago
use ofentity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api
– Amit Bera♦
3 hours ago
add a comment |Â
Thanks, Amit. So if an API usesentity_id
that is bad, correct? They should switch toincrement_id
? Do you know ifentity_id
should matchincrement_id
?
– VirtusB
3 hours ago
use ofentity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api
– Amit Bera♦
3 hours ago
Thanks, Amit. So if an API uses
entity_id
that is bad, correct? They should switch to increment_id
? Do you know if entity_id
should match increment_id
?– VirtusB
3 hours ago
Thanks, Amit. So if an API uses
entity_id
that is bad, correct? They should switch to increment_id
? Do you know if entity_id
should match increment_id
?– VirtusB
3 hours ago
use of
entity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api– Amit Bera♦
3 hours ago
use of
entity_id
is not bad. But use entity_id and increment is totally depends on your business logic.If you want to get order data using increment id,then just create own api– Amit Bera♦
3 hours ago
add a comment |Â
up vote
0
down vote
Good day, your EntityID doesnt have to match your OrderID.
Your Ordernumbers are out of sync because of the quotation system behind magento. For every order a customer wants to make a quote gets created in your database and potentually reserving an ordernumber. Thats why the ordernumbers jump ( Invoice numbers wont jump ).
You can check that yourself on that MySql table:
quote
I hope i could help you with that :)
Hi. Inquote
I have 474 rows, and onlyentity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently theentity_id
is four numbers behindincrement_id
in thesales_order
table.
– VirtusB
3 hours ago
add a comment |Â
up vote
0
down vote
Good day, your EntityID doesnt have to match your OrderID.
Your Ordernumbers are out of sync because of the quotation system behind magento. For every order a customer wants to make a quote gets created in your database and potentually reserving an ordernumber. Thats why the ordernumbers jump ( Invoice numbers wont jump ).
You can check that yourself on that MySql table:
quote
I hope i could help you with that :)
Hi. Inquote
I have 474 rows, and onlyentity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently theentity_id
is four numbers behindincrement_id
in thesales_order
table.
– VirtusB
3 hours ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Good day, your EntityID doesnt have to match your OrderID.
Your Ordernumbers are out of sync because of the quotation system behind magento. For every order a customer wants to make a quote gets created in your database and potentually reserving an ordernumber. Thats why the ordernumbers jump ( Invoice numbers wont jump ).
You can check that yourself on that MySql table:
quote
I hope i could help you with that :)
Good day, your EntityID doesnt have to match your OrderID.
Your Ordernumbers are out of sync because of the quotation system behind magento. For every order a customer wants to make a quote gets created in your database and potentually reserving an ordernumber. Thats why the ordernumbers jump ( Invoice numbers wont jump ).
You can check that yourself on that MySql table:
quote
I hope i could help you with that :)
answered 4 hours ago
Marcel H.
306320
306320
Hi. Inquote
I have 474 rows, and onlyentity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently theentity_id
is four numbers behindincrement_id
in thesales_order
table.
– VirtusB
3 hours ago
add a comment |Â
Hi. Inquote
I have 474 rows, and onlyentity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently theentity_id
is four numbers behindincrement_id
in thesales_order
table.
– VirtusB
3 hours ago
Hi. In
quote
I have 474 rows, and only entity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently the entity_id
is four numbers behind increment_id
in the sales_order
table.– VirtusB
3 hours ago
Hi. In
quote
I have 474 rows, and only entity_id
. It increases by 1 for each quote. So there's about double the amount of quotes than orders. Currently the entity_id
is four numbers behind increment_id
in the sales_order
table.– VirtusB
3 hours ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f245877%2fsales-order-table-increment-id-doesnt-match-entity-id%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password