flatten valid order ids