Skip to content

Assign Tracking Number to Carriers Automatically ​

Overview ​

This article focuses on assigning tracking numbers to different shipments and matching those numbers with the correct carriers. Setting up this process ensures that customers can track their shipments with the appropriate carrier.

Example ​

To better understand this feature, consider the following example:

If a store owner selects 4PX as their carrier with a tracking number like 303367017250, the system might mistakenly assign it to DHL Express instead of 4PX. Instead of manually changing these numbers each time, the user can set a tracking number pattern so the system automatically associates the correct carrier with the tracking number.

Step-by-Step Guide ​

To assign tracking numbers to the correct carriers, follow the steps outlined below:

  1. Locate Apps on the left navigation sidebar.
  2. From the list of installed apps, select the Rush app.

  1. Select Shipments from the navigation sidebar.
  2. Select Settings from the navigation sub-menu.
  3. In the Carrier Assigning Rules section, click on Add Rule.
  4. A popup will open. Provide the following information:
    • Tracking number regex: Specify the regex pattern. Refer to the "Commonly Used Regex Use Cases" section at the end for more details.
    • Pick a carrier: Select the carrier from the list provided by the Shopify platform.
    • Country of destination: Select the destination country/countries if required.

Note: The settings can also be applied to pending shipments, triggering reprocessing for the specified carrier.

Assign Tracking Number to Carrier by Pattern ​

The dialog box allows users to customize settings based on tracking number patterns. For example, if the user assigns a 12-digit tracking number pattern to 4PX, then 4PX will be set as the default carrier for all 12-digit tracking numbers.

Assign Tracking Number to Carrier by Destination Country ​


In addition to using tracking number patterns, you can further customize settings by selecting a destination country. This ensures that the system assigns the correct carrier based on both the tracking number and the destination country.

For instance, Australia Post might also use a 12-digit tracking number. You can update your settings to assign tracking numbers to Australia Post for orders going to Australia, while still assigning 4PX for orders going elsewhere.

Commonly Used Regex Use Cases ​

A regex (regular expression) is a sequence of characters that defines a search pattern. These patterns are used in string-searching algorithms for tasks like find-and-replace or input validation.

Here are some common regex patterns:

  • / – every pattern starts and ends with this character.
  • ^ – indicates what the pattern should start with (start of string/line).
  • $ – indicates what the pattern should end with (end of string/line).

Examples ​

  • /^[A-Z]{2}\d{9}HK$/
    Description:

    • Starts with two alphabetic characters between A-Z.
    • Has 9 digits in between.
    • Ends with HK.
      Example: AA123456789HK, AB123456789HK, AB012345678HK.
  • /^GV\d{9}GB$/
    Description:

    • Starts with GV.
    • Has 9 digits in between.
    • Ends with GB.
      Example: GV123456789GB.
  • /^\d{9,12}$/
    Description:

    • The total number of digits can be between 9 and 12.
      Example: 123456789, 1234567890, 12345678901, 123456789012.
  • /^33[A-Z]{3}\d{18}$/
    Description:

    • Starts with 33.
    • Has 3 alphabetic characters from A-Z in between.
    • Ends with 18 digits.
      Example: 33XHG135275301000935106, 33XHD048087301000935109, 33XHD048767901000935100.

For more information on regex, refer to the following articles:

Contact Us ​

For further information or feedback, feel free to contact us. We’re happy to help!