question

omkar avatar image
omkar asked Jacob Abrams commented

Multiple Customer address for the order problem

Hello Dev, I am having scenario in which i have to set one order to any specific customer but the customer is having more than one address and mobile number so i need to assign any specific address or mobile to that orders only so is there any way of doing so ?

OrdersCustomers
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered Jacob Abrams commented

Just to confirm, your problem is that the Customer has multiple addresses and phone numbers but you want to an order to be associated a particular address and/or phone number? You could possibly use the "notes" field in Order to record the address and phone number although since it is just freeform text other apps and/or the merchant may have information in there already and overwrite anything you write there. If you want a more reliable solution you could store the association of order id to address id in your own server but that will require more work of course.

3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

omkar avatar image omkar commented ·

Thanks @jacobabrams for quick response. One more question Is there any way of setting user defined state(Waiting for prepare /waiting for assign) in place of this system defined (for e.g. open,locked) state of the order ? Is it possible? I am trying to update state of the order like this :

order.setState("Waiting for prepare"); orderConnector.updateOrder(order);

Its giving the exception as follows: com.clover.sdk.v1.ClientException: Invalid object: Order, Maximum string length exceeded for RG07A4TR5NVDW Can please guide in this ?

Thank you, Omkar Kadam

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

I wouldn't recommend setting the state field, that field will also likely being overwritten by Clover during the course of an order's life. I think the only solution here is for you to keep track of this information and state in your own application and server.

0 Likes 0 ·
omkar avatar image omkar commented ·

Ok thanks @jacobabrams

0 Likes 0 ·

Welcome to the
Clover Developer Community