Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8149867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:56:14+00:00 2026-06-06T14:56:14+00:00

I have been working on a database that holds order numbers and order information.

  • 0

I have been working on a database that holds order numbers and order information. Previously I used a report that provided an order ID and a unique item ID for each item ordered. The item ID was the primary key as it was a uniquely assigned value.

This meant that one order # could have multiple items within it, each item identified by a unique item ID.

Now our requirements have changed to become more real time, which means the report that provided the unique item ID’s has not run. As such I will need to generate my own unique item id’s, but only within the same order #.

Additional information for those who use Amazon’s MWS:

Previously I was using the Reports API to generate _GET_AMAZON_FULFILLED_SHIPMENTS_DATA_ to provide our fulfillment data while a 3rd party integrations company pulled the _GET_FLAT_FILE_ORDER_REPORT_DATA_ report to handle our merchant fulfilled orders. We are now looking to make our merchant fulfilled orders real-time using the Orders API, which unfortunately does not provide the orderItemId that is provided by the _GET_FLAT_FILE_ORDER_REPORT_DATA_ file. The problem I need to solve is related to the absence of that field.

Some sample data to work with would be:

Order-ID        Item-ID        Item
222-2212            1         redShirt
222-2216            1         redShirt
222-2212            2         blueShirt
222-2212            3         greenShirt
222-2218            1         noShirt

I would like to be able to something like:

SELECT * from order_data WHERE Order-ID like '222-2212'; 

and have all 3 items returned. The problem I have is I have no idea how to provide a unique auto-incremented number based upon the count of the Order-ID. I also want to avoid using a standard auto-incremented value across all data as I could then end up with duplicate orders and would need to try and filter using DISTINCT.

Does anyone have any ideas, pointers or suggestions on how I may accomplish this? I do have the luxury of redesigning the entire database from scratch so I am open to suggestions.

–EDIT–

I am currently following up with Amazon to determine if the orderItemId returned by the orders API is randomly generated. I will post more details here when I find out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:56:15+00:00Added an answer on June 6, 2026 at 2:56 pm

    Turns out that the orderItemId is in fact a unique value. I was able to locate the documentation on Amazon’s site under Confirming Multiple Shipments using Feeds. The statement states:

    order-item-id Amazon.com’s unique identifying number for an item in an order. This number is provided in your Orders Report. Note: This is not the same as the product ASIN. The order-item-id will differ from order to order.

    I will be using this as my primary key, so I will not need to generate a random value as I expected this morning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a mysql database that I set up with phpmyadmin...
I have been working on a script that pulls testimonials from a database, adds
I have been working on something that checks an MySQL Database to check something
I have been working with XML in database LINQ and find that it is
I have been working with databases recently and before that I was developing standalone
I have been working on VB6 database desktop programming, but now a client is
I have been working on a Core Data iOS app that works perfectly through
I have a PHP site with a mySQL database that I'm working on. I'm
I'm trying to serialize objects from a database that have been retrieved with Hibernate,
I have been working on a project that takes a MySQL dump and restores

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.