Page 1 of 1

Fullfillment / shipping - options and providers

Posted: Wed Sep 10, 2014 7:46 am
by bibroy
The java-doc for interface FulfillmentOption states:
FulfillmentOptions are also inherently related to FulfillmentProcessors, in that specific types of FulfillmentOption implementations should also have a FulfillmentPricingProvider that can handle operations (estimation and calculation) for pricing a FulfillmentGroup. Typical third-party implementations of this paradigm would have a 1 FulfillmentOption entity implementation and 1 FulfillmentPricingProvider implementation for that particular service.


Questions:

    Question-1: does "FulfillmentProcessors" here means "FulfillmentPricingProvider"s
    Question-2: does the above in quote mean that every implementation of FulfillmentOption will have a parallel implementation of FulfillmentPricingProvider ....this point is very confusing
    Question-3: hope " particular service " means shipping service in the functional sense and not in the API sense
    Question-4: what is the difference between estimation and calculation? Is estimation done prior to checkout and calculation is done after checkout...?

Re: Fullfillment / shipping - options and providers

Posted: Sat Sep 13, 2014 1:44 pm
by phillipuniverse
Question-1: does "FulfillmentProcessors" here means "FulfillmentPricingProvider"s

Yes.

Question-2: does the above in quote mean that every implementation of FulfillmentOption will have a parallel implementation of FulfillmentPricingProvider ....this point is very confusing


This is on an implementation level, not an instance level. So a FedexFulfillmentOptionImpl (which a class extending from FulfillmentOptionImpl) will have a corresponding FedexFulfillmentPricingProvider, a UPSFulfillmentOptionImpl will have a corresponding UPSFulfillmentPricingProvider, etc. With each of those fulfillment option types, there could be many entries in the database describing the options available for a user to pick from. For instance, there could be an entry in the database for a FedexFulfillmentOptionImpl that represents next-day air, one that represents ground, etc. Each of those instances would be processed by the FedexFulfillmentPricingProvider.

Question-3: hope " particular service " means shipping service in the functional sense and not in the API sense

Correct, a 'particular service' in this context means FedEx, UPS, USPS, Royal Mail, etc.

Question-4: what is the difference between estimation and calculation? Is estimation done prior to checkout and calculation is done after checkout...?


Sometimes you want to give an estimation to the user so that they can select from the different options. Obviously, something like next day air will cost more than regular ground shipping, so you will probably want to display those price differences to the user. In practice, the estimation will likely just delegate to the calculateCost method, but we wanted to provide that flexibility in case you needed to make a distinction between the 2 operations.

Actually both the estimation and calculation are done prior to checkout. The difference is that the calculation actually sets prices on a FulfillmentGroup while estimation just gives you potential prices. Think of estimation as what you show to the user before they pick something and then calculation as what happens after the user picks it.

Re: Fullfillment / shipping - options and providers

Posted: Sat Dec 13, 2014 2:57 am
by Endrio
Typos. At one point I think we called them processors and then we changed them to providers after a bit of refactoring. Looks like not every single place that we used the term got updated. Sorry for the confusion.