Carrier Allocation Engine
Introducing the Allocation Engine
When you ask this system for delivery options, it looks over all the services you are subscribed to, and then checks each one to see if it meets your criteria. Once it is satisfied a particular service can carry the consignment, it will determine the possible collection and delivery days. Finally, it will apply any filter you want, and then return the results to you.
For the actual allocation phase, the same process is done under the bonnet. The difference is that the results are sorted in a particular way, and the consignment is allocated to the first one.
Whereas in earlier incarnations of the system (pre-2.0) it was assumed that the cheapest service was the best, this new version allows you to determine what is "best" by sorting the results.
Finally, when performing options searches, you get everything back in one go. All the services, all the prices, and all the dates. Some thought will be needed to determine how to ask the question, but we're confident the API can give you the answer you need.
This diagram shows some of the more important factors that get taken into consideration when the allocation engine chooses a carrier, and you can find a PDF copy at the bottom of this article.

Fundamentals
Date Ranges. A major distinction between the old model and the new model is that we now consider date ranges as a fundamental, and not merely a date. For example, we used to allow you to specify the despatch date. The old engine would allocate to services despatching on that date or the next working day, when that date was unavailable. There was no way to guarantee the despatch date. The inclusion of date ranges allows you to specify which dates you like (or don't like), and ask questions such as "collect between 15th and 20th April". But the same model allows you to ask "deliver by the 10th December" or "deliver on the 10th December" - different questions, and commonly asked for.
Acceptability & Unacceptability. By far the most important factor when communicating with the allocation engine is the concept of acceptability. You decide what is acceptable and, conversely, what is unacceptable. You can specify which services you want the engine to consider or not to consider, or which carriers, types, groups, collection dates, delivery dates, ranges, days of the week, maximum costs etc. Moreover, you can combine all these criteria into a single filter.
Compound. You can combine multiple date ranges. This allows you to ask highly complex questions like "collect it by 15th May, but not on a Thursday, and deliver it between 10th May and 20th May, but not on the 18th, or on a Monday or Tuesday".
Filtering & Sorting. The strategy the system takes is rather simple: It finds all services and dates that you regard as acceptable (and the carrier can achieve) and then it filters and sorts the results.
In fact, there are two phases of sorting. Firstly, results are sorted before they are filtered. They are sorted again afterwards for presentation. If you choose to filter by, say, service, it will go through all the possible options extracting the first option for each distinct service. In a more complicated arrangement, you can perform a pre-filter sort by cost, then filter by delivery day. That will give you the cheapest options for each possible delivery day (and if you were to sort the final results by the delivery date, you'd have the ideal method to produce a calendar to present to the user).
| Attachment | Size |
|---|---|
| cae_allocation.pdf | 6.25 KB |

