{"section":"tutorials","requestedLocale":"en","requestedSlug":"vtex-pick-and-pack-last-mile","locale":"en","slug":"vtex-pick-and-pack-last-mile","path":"docs/en/tutorials/shipping/vtex-pick-and-pack/vtex-pick-and-pack-last-mile.md","branch":"main","content":"> ℹ️ If you are interested in implementing for your business, fill out our [form](https://vtex.com/us-en/contact/) and indicate the name of the desired product in the `Comments` section.\n\n[VTEX Pick and Pack](https://content.vtex.com/en/pick-and-pack/) is a solution to streamline stores’ fulfillment processes by optimizing orders’ picking and packing, and the last-mile delivery. The solution is composed of the [VTEX Fulfillment](/en/docs/tutorials/vtex-pick-and-pack-fulfillment) and the **Last Mile** modules. \n\nWith **Last Mile**, merchants have complete visibility of shipping and order tracking. The module has the following sections:\n\n* [Shipping services](#shipping-services)\n* [Settings](#settings)\n\n> ℹ️ To start using Last Mile, it is necessary to adjust the feature's Settings.\n\n## Shipping services\n\nWhen you access in your VTEX Admin, **Apps > Last Mile > Shipping services**, you find a page listing the store’s shipping services, which are the [services created](#create-shipping-service) for each delivery, as in the image below:\n\nThe following table contains a description of the columns:\n\n|   Column   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n|:----------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|   Carrier  | The [carrier](/en/docs/tutorials/carriers-on-vtex) is the company responsible for delivering the packages to customers. The courier is the driver who makes the delivery.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| Service ID | Every shipping service has its own identification code that appears in this field, alongside its creation date.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n|  Customer  | Name and address of the customer who made the purchase.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n|   Item(s)  | Total number of items that will be delivered. If two packages have three items each, in this column you will see the number six.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n|  Deadline  | Limit date for the customer to receive the order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n|   Status   | The Shipping service statuses are:<br />- Created: The shipping service has just been created. This is an internal status that validates the service data.<br />- Pending: This is the service first status, of when the system sends the information to the carrier and creates the service on the carrier’s side.<br />- Assigned: The carrier has assigned a courier for the task and the courier has accepted the shipping service.<br />- Canceled: The shipping service was canceled.<br />- Delivered: The order was delivered to the customer, whether it’s their address or a [pickup point](/en/docs/tutorials/pickup-points).<br />- Incident: The carrier or courier reported an incident, a problem with the road, for example. The courier can [add a note](#field-templates-section) giving more details.<br />- On hold: The courier puts the shipping service on hold. That can happen for many reasons, a broken vehicle, for example. When it happens, the courier can give an [explanation note](#field-templates-section).<br />- On route: The courier has collected the package in the physical store or [warehouse](/en/docs/tutorials/warehouse), for example.<br />- Picked: The courier has collected the package.<br />- Returned: The customer couldn’t be reached or refused to receive the package, so the order was returned. |\n\nYou can perform the following actions in the **Shipping services**:\n\n* [Search](#search)\n* [Filter](#filter)\n* [Create shipping service](#create-shipping-service)\n* [View shipping service details](#view-shipping-service-details)\n\n### Search\n\nOn the top of the page, there is a search box with the magnifier icon  <i class=\"fas fa-search\"></i> in which you can search for shipping services using the following criteria:\n\n* Service ID\n* Order ID\n* Customer name\n* Customer email\n* Carrier ID\n* Carrier name\n* Courier ID\n* Courier name\n\n### Filter\n\nYou can filter shipping services using different criteria, by clicking `Filters` and then clicking `+ Add Filter`. You will see the filter options below:\n\n* **Status:** Shipping services [statuses](#view-shipping-service-details).  \n* **Carrier:** Company responsible for delivering the package to the customer.  \n* **Payment:** [Payment method](/en/docs/tutorials/difference-between-payment-methods-and-payment-conditions) used by the customer, like a credit or a debit card.  \n* **Store:** Which store is related to the shipping service.  \n\nYou can combine as many filters as you want. To do so, click **Filters > + Add Filter**, and then on the menu <i class=\"fas fa-ellipsis-v\"></i> click `Duplicate`. If you wish to delete a filter, in the menu <i class=\"fas fa-ellipsis-v\"></i> click `Delete`.\n\nTo remove all selected filters, click `Filters`, and then click `Clear filters`.\n\n### Create shipping service\n\nShipping services can be [created automatically](#general-section) or manually by an [admin user](#users). The main difference is that when you import an order, most of the information in the **New Shipping Service** page is automatically filled.\n\nTo manually create a shipping service from an order, follow the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Shipping services**.\n2. Click `Create Service`.\n3. Search the order by entering the order ID in the search box or filter orders by creation date, using the `Filter` button. \n\n  > ⚠️ Only orders in the `invoiced` status will appear in the list and search results.\n\n4. Click the order.  \n5. Click `Create From Order {order ID}` and you will be redirected to the _New Shipping Service_ page.   \n6. Most of the data will have been imported from the order, but you can still change it, if needed. Check the information and make the necessary changes in the tabs:  \n    - **Pickup:** Fill in with the address information of where the courier will collect the packages. Be aware that this field has no relation with the usual concept of [pickup point](/en/docs/tutorials/pickup-points) in VTEX.\n    - **Delivery:** Fill in with the address information of where the courier will deliver the packages, whether the customer’s address or a [pickup point](/en/docs/tutorials/pickup-points). \n    - **Content:** Select the content of the delivery, it can be _Order items, Order invoices_ or _Other._\n    - **Carrier:** Select the expected date for the courier to collect the packages, and the expected date for the package to get to its destination. After that, click the carrier to select it for the shipping service.\n7. When everything is ready, the `Create Service` button will appear and you must click it. \n\nYou can also manually create a shipping service without importing the order’s information. To do so, in step 2 click `Create Manually` and go on from step 7 to the end. \n\n### View shipping service details\n\nIn the **Shipping services** page, you can see more information about each shipping service created by clicking it. This will open a modal that looks like the following image:\n\nIn the modal, there are four tabs:\n\n|     Tab     |                                                                                                                                                                                                    Description                                                                                                                                                                                                    |\n|:-----------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|   Details   | Displays detailed information related to the shipping service, for example:<br />- Service type<br />- Estimated delivery date<br />- Address to collect packages<br />- Shipping information<br />- Order’s items details<br />- It also displays a Timeline with the history of the shipping service, from its creation to carrier’s status updates. The addition of a new note or evidence also appears in the Timeline, among others. |\n|   Tracking  | The tracking is only available if the courier is `Last Mile`. <br />It presents information and metrics about the courier:<br />- Current delivery capacity<br />- License number<br />- Type of vehicle<br />- Courier’s mobile device battery<br />- Ccourier’s evaluation according to customers (from 0-5)<br />You can send a message to the courier with the <i class=\"fas fa-envelope\"></i> `Send Message` button.                 |\n| Attachments | Shows the content attached to the shipping service, if there is any. For example, a digital signature from the customer as proof of delivery.                                                                                                                                                                                                                                                                     |\n|    Notes    | When the courier sends notes and text messages, their history is saved here.                                                                                                                                                                                                                                                                                                                                      |\n\nOn the top of the modal, sometimes appears a menu  <i class=\"fas fa-ellipsis-v\"></i>, depending on the shipping service’s status. When you click it, different options appear for each status. For example:\n\n- `Pending` status: **Assign Courier**\n- `On route`: none\n- `Delivered`: **Tracking URL**\n- `Canceled`: **Tracking URL**\n\n## Settings\n\nWhen you access in your VTEX Admin, **Apps > Last Mile > Settings**, you find **Couriers**, where you configure couriers and users. You must be an [admin user](#users) to be able to make editions. \n\nIn the **Couriers** page, there are the following tabs:\n\n* [General](#general)\n* [Last Mile](#last-mile)\n* [External Carriers](#external-carriers)\n* [Users](#users)\n\n### General\n\nIn this tab, you can configure the address where carriers will collect the packages for delivery, by following the steps below:\n\n1. In **Pickup address**, fill in manually the address where courier will pick packages for delivery or use the search box with the magnifier icon  <i class=\"fas fa-search\"></i> to find the address, what will automatically fill in the address information.\n2. In **Contact information**, fill in with the _name, phone_ and _email _of the courier’s contact.\n3. Click `Save`.\n\n### Last Mile\n\nIn **Settings > Last Mile**, you will find the following sections:\n\n* [General section](#general-section)\n* [Last Mile section](#last-mile)\n* [Field templates section](#field-templates-section)\n\n#### General section\n\nYou can configure the **Last Mile** activation by clicking on the switch at the top of the page <i class=\"fas fa-toggle-on\"></i> `Activate` or <i class=\"fas fa-toggle-off\"></i> `Deactivate`.\n\nThere are three main parts in this section: \n\n* Courier assignment\n* Capacity management\n* Automatic creation\n\nThe following image is an example of the `Courier assignment` section:\n\n- **Location accuracy in courier app:** determine the precision of the courier’s app identifying and transmitting the courier’s location. This configuration interferes with the battery duration of the mobile device, depending how often the location is updated. The options are described in the table below:\n\n|  Option  |                                                                                     Description                                                                                     |\n|:--------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|   High   | The app refreshes the courier’s location every 3 seconds. This is the most precise option, but it consumes a lot of the courier’s mobile device battery.                            |\n|  Medium  | The app refreshes the courier’s location every 30 seconds. This is an option with intermediary precision, and it consumes a moderate amount of the courier’s mobile device battery. |\n|    Low   | The app refreshes the courier’s location every 60 seconds. This is the least precise option, but it consumes the minimum amount of the courier’s mobile device battery.             |\n| Disabled | The app will refresh the courier’s location only when he updates his service status or when he opens the app.                                                                       |\n\n* **Automatic courier assignment:** If the switch is enabled <i class=\"fas fa-toggle-on\"></i>, the system will try to automatically assign a courier to every service created for _Last Mile_.\n    * **Assignment strategy:** The automatic courier selection algorithm when a service is created can be based on one of the following rules:\n        * `One at a time`: The task request notification is sent to the courier who is closest to where the package must be collected. If the first courier does not accept the task within the requested expiration time, the request is sent to the second closest courier, and so on. While no one accepts the task, it remains unassigned.  \n        * `Send to All`: The task request notification is sent to all couriers available in the service time zone, up to the maximum limit of 500 couriers. The service is assigned to the courier that accepts it first, and the service remains unassigned until someone accepts it.  \n        * `Round Robin`: Round Robin is an allocation algorithm based on parameters that can be configured. The task is assigned to the courier who is closest and considers how many active services he already has. You can customize the algorithm for assigning the task to couriers who are not connected, for example.  \n        * `Nearest Available`: The task is automatically assigned to the courier based on their availability and distance. However, the courier still needs to accept the task.  \n    * **Request expiration (in seconds):** Enter the desired number or click the buttons <i class=\"fas fa-minus\"></i> and & <i class=\"fas fa-plus\"></i> to determine:\n        * Request expiration (in seconds) \n        * Number of retries  \n    * The switches below appear only when the `Round Robin` Assignment strategy was chosen. They can be activated or deactivated independently of one another:\n        * <i class=\"fas fa-toggle-off\"></i>  Consider courier rating (higher rating will be prioritized)\n        * <i class=\"fas fa-toggle-off\"></i>  Assign task to offline couriers\n        * <i class=\"fas fa-toggle-off\"></i>  Restart assignment if the service is declined\n        * <i class=\"fas fa-toggle-off\"></i>  Prioritize idle couriers (couriers without tasks will be prioritized)\n        * <i class=\"fas fa-toggle-off\"></i>  Calculate courier ETA from current location to next pickup\n\nThe image below represents the `Capacity management` section:\n\n* **Capacity calculation:** the courier’s shipping capacity will be calculated based on one of the following values:\n    * `Item(s)`: The courier’s capacity will vary according to the number of items inside packages.\n    * `Package(s)`: The courier’s capacity will vary according to the number of packages.\n    * `Service(s)`: The courier’s capacity will vary according to the number of shipping services assigned to the courier.\n* **Max. capacity:** Enter the desired value or click on the buttons <i class=\"fas fa-minus\"></i> and <i class=\"fas fa-plus\"></i>  to determine which number will apply to the previously configured rule.\n\n#### Couriers section\n\nIn this section, you can add a new courier, edit an existing one or send a message to the courier. \n\nTo add a courier, follow the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Last Mile > Couriers**.\n2. Click `Add`.\n3. Fill in with the courier’s information:\n    * Username\n    * First name\n    * Last name\n    * Email\n    * Phone\n4. Enter a password for the courier to access the app. It must contain at least one uppercase letter, one lowercase letter, one number and one special character. Select the stores that will be associated with the carrier.\n5. Click the type of vehicle, it can be one of the following:\n    * Walk\n    * Bike\n    * Scooter\n    * Car\n    * Van\n    * Truck\n6. Enter the courier’s License.\n7. If desired, add other information.\n8. Slide the slider to determine the number of the courier’s delivery capacity; the range is the limit set on the [General section](#general-section). \n    > Whether the number in the slider represents items, packages or shipping services was set in the [General section](#general-section).\n9. If you wish to associate the courier with a color, the vehicle color, for example, click on the color code and select the desired one.\n10. Click `Create`.\n\nTo edit a courier, follow these steps:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Last Mile > Couriers.**\n2. Locate the courier by scrolling the list or using the search bar. You can search by entering the courier's name or phone. \n    > When you search a courier using the search bar, you must enter a few characters of the name or phone, because the search does not return results for a single letter or number. \n3. Once you locate the courier, click on it.\n4. Make the desired changes.\n5. Click `Save`.\n\nTo send a message to the courier, follow the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Last Mile > Couriers**.\n2. Locate the courier and click on it.\n3. In the top right corner of the edition window, click the envelope icon <i class=\"fas fa-envelope\"></i>.\n4. Enter your message.\n5. Click `Send`. \n\n#### Field templates section\n\nCreate the fields for the task that will be sent to couriers. You can configure multiple fields for different actions. For example, a mandatory field for the courier to confirm the acceptance of the task, or a barcode field for scanning products.\n\nTo create a new field template, follow the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Last Mile > Field templates**.\n2. Click `Add Field Template`.\n3. Fill in the fields and select the desired options —  each field is described in the table below.\n4. Click `Add`.\n5. Click `Save`.\n\n|       Column      |                                                                                                   Description                                                                                                   | Mandatory or Optional |\n|:-----------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------:|\n|     Field Name    | Name that appears in the courier’s mobile device and identifies the field.                                                                                                                                      |       Mandatory       |\n|    Permissions    | Type of permission given to the courier, it can be:<br />Read Only: View the information in the field.<br />Read & Write: Add new fields or modify the existing ones.                                               |       Mandatory       |\n|     Field Type    | Field's data type. For Read & Write permission, it can be:<br />Number<br />Text<br />Image<br />Date<br />Barcode<br />Check<br />Email<br />For Read Only permission, it can be Number, Text and Email.                       |       Mandatory       |\n|       Value       | Field for when there is a default value or a value for read-only fields.                                                                                                                                        |        Optional       |\n|     Mandatory     | Click the checkbox to determine whether or not the field will be mandatory for the courier to start/complete the task.<br />Couriers can only start or finish the task if mandatory fields’ requirements are met. |        Optional       |\n| Edit Before Start | Click the checkbox to determine whether or not the field must be edited before starting the task.<br />Couriers can only start or finish the task if mandatory fields’ requirements are met.                      |        Optional       |\n|      Actions      | When you click on the <i class=\"fas fa-times\"></i>, you delete the field. This action is permanent.                                                                                                             |        Optional       |\n\n### External Carriers\n\nIn this tab, you see the available external carriers for your shipping services. They will only be valid once they are activated <i class=\"fas fa-toggle-on\"></i>.\n\nTo activate an external carrier, follow these steps:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > External Carriers**.\n2. Click on the desired carrier.\n3. Fill in the fields.\n\n    > Each external carrier has their own configuration fields, some of which you will need to get in touch with the carrier to get the information. If necessary, get in touch with your carrier’s support.\n\n4. Click the switch <i class=\"fas fa-toggle-on\"></i> `Active` on the top of the window.\n5. Click `Confirm`.\n6. Click `Save`.\n\n### Users\n\nThe **VTEX Pick and Pack** concept of _user_ is different from the common meaning of the term in VTEX. In **Last Mile**, there is the _admin_ user, but it does not mean the [Sponsor user](/en/docs/tutorials/what-is-the-sponsor-user) - also referred as _Admin Super_ and _Owner_.\n\n> ℹ️ For more information, see the articles [Roles](/en/docs/tutorials/roles) and [License Manager](/en/docs/tutorials/license-manager-resources) resources.\n\nTo become an admin user in the **Last Mile** module, you must have certain License Manager permissions. We recommend [creating a role](/en/docs/tutorials/roles) identified as “_Fulfillment admin”_, which must have at least the following products and resources associated with it:\n\n|     Product     |                                                                                                                        Associated Resources                                                                                                                        |\n|:---------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|     Insights    | Insights metrics                                                                                                                                                                                                                                                   |\n| License Manager | Get account by identifier<br />Get applications<br />Find user by email<br />View users with account access<br />View all admin users<br />Get resource by key<br />Get role<br />Get paged roles<br />Get paged users<br />Get admin status<br />Get accounts<br />Get accounts by host |\n|    Field Type   | Field's data type. For Read & Write permission, it can be:<br />Number<br />Text<br />Image<br />Date<br />Barcode<br />Check<br />Email<br />For Read Only permission, it can be Number, Text and Email.                                                                          |\n> ⚠️ If you are an admin user in [VTEX Fulfillment](link), you will automatically be an admin user in Last Mile.\n\nIn **Users**, you can perform the following actions:\n\n* [Search user](#search-user)\n* [Filter user](#filter-list)\n* [Create admin user](#create-admin-user)\n* [Edit user](#edit-user)\n* [Generate Api-Key](#generate-api--key)\n* [Delete user](#delete-user)\n\n#### Search user\n\nOn the top of the page, there is a search box with the magnifier icon  <i class=\"fas fa-search\"></i> in which you can search for users using the following criteria:\n\n* Username\n* Name\n* Email\n\n#### Filter list\n\nYou can filter the list to display admin users only or all of the **VTEX Pick and Pack** users, which includes _pickers_ and _customer service_ created in [VTEX Fulfillment](link).\n\nTo filter the list, click the icon with bars <i class=\"fas fa-bars\"></i> and choose between `All` and `Admin`. \n\n#### Create admin user\n\nThe only user profile that can configure **Last Mile** is the admin user. To create a new admin user, follow the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Users**.\n2. Click `Create`.\n3. Click `Admin`.\n4. In the box, search by typing the user’s name, email or ID.\n5. Click `Create`.\n\n#### Edit user\n\nAlthough it is only possible to create admin users in **Last Mile**, an admin user can edit all of the users listed in the page, whether they are admins, pickers or customer services. To know more about these other users, see [VTEX Fulfillment](/en/docs/tutorials/vtex-pick-and-pack-fulfillment).\n\nYou can edit the information listed below. \n\n* Name\n* Password for the mobile application\n* Categories\n* Store\n\nTo edit a user, follow these steps:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Users**.\n2. Click the row that corresponds to the user you want to edit.\n3. Make the desired changes.\n4. Enter the password meant for who is using the mobile application.\n5. Click `Save`.\n\n#### Generate Api-Key\n\nAdmin users can generate Api-Keys to use **VTEX Pick and Pack** APIs, and each user can have only one Api-Key. For more information, see our [documentation for developers](https://developers.vtex.com/docs/guides/vtex-pick-and-pack).\n\nTo generate an Api-Key, follow the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Users**.\n2. Click the row that corresponds to the admin user you want to associate with the Api-Key.\n3. Click `Generate`.\n4. Save the Api-Key in a safe place.\n\n  > ❗ You only see the Api-Key once, you will not be able to access this information again, so make sure it is in a safe place.\n\n5. Enter the password meant for who is using the mobile application.\n6. Click `Save`.\n\n#### Delete user\n\nOnly admin users can delete other users, by following the steps below:\n\n1. In your VTEX Admin, go to **Apps > Last Mile > Settings > Users**.\n2. Click the row that corresponds to the user you want to delete.\n3. Click `Delete User`.\n4. Click `Yes`."}