After receiving the login data for our tenant, we will start with creating facilities (locations) from where orders are fulfilled. This part of the tutorial shows you how.
On our platform, facilities are representations of the locations where orders are fulfilled. In this example we will add a store which sells candy - Bill's Candy Shop. Our platform differences between stores and warehouses. Warehouses usually don't offer Click&Collect, while stores might offer this service. Bill's Candy Shop offers only Ship from Store as we try to stay basic in this tutorial. For a more detailed view of what you can do with facilities, see .
Placeholders
Whenever you see your.api.fulfillmenttools.com, replace it with the tenant information you received from Professional Service, e.g. ocff-wonkacandycompany-pre.api.fulfillmenttools.com.
Placeholder
Replace with
Example
Create the facility
For creating a facility, only little information is required. See more in the REST API documentation of facilities as this only a short tutorial. Please note, there is no check whether the facility's address exists.
The fields "services", "status" and "locationType" are not required, but we highly recommend adding at least the services section as this enables the store to ship orders.
If your request was successful, you'll receive a 201 CREATED response with a body like this:
After we set up our environment as mentioned above, we are ready for creating our facilities using the API. For a more detailed explanation on the topic, see . Let's add the first facility, the flagship store in Frankfurt, Germany.
Prior to looking at the response, let’s dive deeper into the properties:
name: That is the name you use for that facility, might be an internal name like "Frankfurt flagship store"
address: Where the facility is located.
locationType: Type of the location, could be either STORE, EXTERNAL or WAREHOUSE. Warehouses do not offer Click&Collect services.
tenantFacilityId: ID of that facility in your systems, optional but must be unique.
status: Status of the facility after creation: ONLINE facilities are ready to fulfill new orders. SUSPENDED facilities can fulfill the current workload but don't accept new orders. OFFLINE facilites can't fulfill new or current orders.
services: The services this facility is offering (e.g. PICKUP or SHIP_FROM_STORE). Warehouses usually don't allow the customer to pick up the goods.
pickingTimes: The times when the employees can pick incoming orders. They can differ from the opening hours. For each picking time a certain capacity can be defined, which defines the amount of orders that can be processed within this timeframe.
The platform should respond with a 201 CREATED response, indicating everything worked well and containing the facility in it's payload:
In the response you might have noticed the following properties which were not part of the creation request:
id: The ID the facility has in the fulfillmenttools platform.
version: The version the entity has in the database. This is important for locking mechanisms, usually it's version 1 when creating the facility.
fulfillmentProcessBuffer: Duration in minutes until an order is fully processed.
capacityEnabled: Indicates that configured capacity limits for picking times are considered.
created: Indicates the date and time the facility was created in the fulfillmenttools platform.
lastModified: indicates the date and time the facility was last modified.
Now that we have created the first facility, we can create the other facilities. To avoid an unneccesary long page, the other calls won't be logged on here. In our case, every store has the same picking times each day, except that German, Swiss and Austrian stores won't pick on Sundays.
Adding the warehouses
After we added the stores, we now want to add the warehouses as well. While the endpoint stays the same, the payload differs. Let's make the first call together. Warehouses are picking from 5 AM to 12 AM, monday to saturday in all countries. They also have higher capacities - even though we do not use them, yet. Currently, our platform does not support picking times until 12 AM, so 11.59PM is what we set.
Now the facilites are set for us. In a further stage it is imaginable to periodically check with an ERP system whether there are new facilities which should be created in the platform as well or reacting to an event from the ERP on the integration layer. But for now, we are good.
Disclaimer
The addresses were randomly picked by looking up the city on Google Maps and zooming into a random place in that city. If one of the addresses is offending you in any way, please let us know and we will change it immediately.