Customer ID field locations from an order

We have a Food Truck oriented App that times orders from entry in Squares system along with displaying the customer name, order info, all customer items to be made and can text the customer when the order is ready. Orders are entered on the local POS as well as on line for pickup, delivery or eat at the location.

Sometimes (mostly not though) when the customer orders online thru the Square site the customer ID is not part of the order record but can be part of the payment record, which we also look for. This can happen when the customer is in the Square database.

What are the rules for the location (or null) of the customer ID?. Are there any other places we should be looking for it. The customer ID is important for this app.

James

Hi @jamesmcorliss welcome to the forums!

Is there a difference in how you’re creating the order or payments? To be clear, via the API, you can set the customer_id in multiple places: the payment, the root-order, or the fulfillments part of the order (or a mix-match of any or all of these). How are you currently setting the customer_id?

I don’t create orders or payments. The customer ID is created by Square either on line or with the Square POS. I just read the order data and look up the customer. So the variation in Customer ID field population is on Squares end. I currently look in those 3 places as some are populated and some are null for different orders.

I was wondering if there could be any other places Square might put it that I should be looking?

James

1 Like

Thanks for clarifying. Yeah it makes sense they show up in different places; as far as I know Square Online uses the Orders API while the Square POS does not so the customer_ids will probably be in different places. For all current and future transactions, a customer_id should appear either on the order or payment. If you have some older payments, it’s possible that the customer_id only existed on the now deprecated transaction_id.