datafoodconsortium / ontology

The DFC ontology is available as OWL and RDF.
https://datafoodconsortium.gitbook.io/dfc-standard-documentation/semantic-specifications
GNU Affero General Public License v3.0
18 stars 3 forks source link

Order can't selects many Shipping Option #141

Open simonLouvet opened 1 month ago

simonLouvet commented 1 month ago

I need to identify the pick-up and delivery points for orders, but the Order class selects one and only one Shipping Option.

RachL commented 1 month ago

Just to be sure: an order can have several shipping options but a real order has in the end only one shipping method ?

RaggedStaff commented 1 month ago

I think @simonLouvet is referring to the logistics issue that an Order needs to be collected from somewhere & delivered to somewhere else.

I don't think that is the same as having a pickupOption & deliveryOption.

I think we did discuss this in a ontology call but it was a long time ago & I can't find the diagram that @Alcoz did.

Baptiste - can you recall what was discussed/agreed ?

RaggedStaff commented 1 month ago

Notes from [slack discussion}(https://datafoodconsortium.slack.com/archives/C020KLNTDF0/p1719489678423519):

I think you might need to use the hostedAt property from SaleSession for the pickup Place on the Order details. It's a hack, but I don't think we have this in the Ontology currently (& it should be the same for all the deliveries from a single SaleSession, yes?) .

Further notes from Ontology Call:

ShippingOption is selected by Customer, so shouldn't be used for logistics work.

LocalizedProduct & PhysicalProduct points to Stock, which points to a PhysicalPlace (either localizedBy or isStoredIn respectively) - that is where the Product is located, and should be the collection point for logistics.

lecoqlibre commented 1 month ago

So @simonLouvet to get point of departure you have to look for the location of each LocalizedProduct or PhysicalProduct of the order.

The point of arrival is the location linked to the shipping option chosen by the customer.

simonLouvet commented 1 month ago

Ok but in m'y exemple i have only definedProduct. I need ton create a New product with a New uri or change type oh my products?

lecoqlibre commented 1 month ago

Yes, each Supplied product should be linked to a Localized and even a Physical product (if the product is real or physically stored at some place). Therefore new URIs should be created.

simonLouvet commented 1 month ago

ok @lecoqlibre, but that doesn't solve my basic need. An OrderLine concerns a DefinedProduct. How can we determine which is the LocalizedProduct of this DefinedProduct? Why doesn't an OrderLine concern a LocalizedProduct? I still don't understand how I find out where the product to be shipped is located.

RaggedStaff commented 1 week ago

Proposal to link 1 OrderLine directly to 1 PhysicalProduct (fulfils the OrderLine). This is in addition to the link to SuppliedProduct (via Offer/CatalogItem).

The Supplier must provide this link (but not until Order completion/fulfilment). It may be provided at Order creation, if available.

simonLouvet commented 1 day ago

@RaggedStaff @Alcoz @lecoqlibre here's the state of my test dataset by uncluding the relationship between orderLine and PhycicalProduct https://github.com/datafoodconsortium/business-api/blob/main/user.json