Skip to main content

Notifications

Community site session details

Community site session details

Session Id : d5wDGxpak8z3Qzv5idL0Sn
Power Automate - Building Flows
Answered

UPS, FedEx Tracking URLs

Like (0) ShareShare
ReportReport
Posted on 2 Jul 2021 20:50:29 by

Hello,

 

I am working on a Shipping Request Power App. When the Logistics Team presses a button to send a shipping confirmation to the user, I would like the email notification to include either the UPS or FedEx tracking number link in the body of the email depending on how the item was shipped. As you know, there are many different shipping options for each carrier so I'm wondering how best to handle that in Power Automate. I'm a rank beginner in Power Apps so I would appreciate your advice.

 

In the Power App I leverage the StartsWith function. Does Power Automate have that function?

 

I have a status pop-up screen on the home page. The OnSelect property of the button is:

 

If(StartsWith(ddShipMethodLS.Selected.Value, "UPS "), Launch("https://www.ups.com/track?loc=en_US&requester=ST/"), StartsWith(ddShipMethodLS.Selected.Value, "FedEx "), Launch("https://www.fedex.com/en-us/tracking.html"))

 

 

The Text property of the button is:

 

If(StartsWith(ddShipMethodLS.Selected.Value, "UPS "), "CLICK HERE to track your UPS shipment(s).", StartsWith(ddShipMethodLS.Selected.Value, "FedEx "), "CLICK HERE to track your FedEx shipment(s)")

 

 

The icing on the cake would be to not only have it go to the generic tracking urls noted above, but actually have it "deep link" dynamically to the actual tracking profile as seen in a screenshot below of something I ordered online. The email has the text "The tracking number is: 123XYZ456LMO." The tracking number is made up, but you get the idea. When I click on the url it dynamically takes me to the specific detail screen.

 

TrackingSS.png

 

Thanks in advance for your help!

Teresa

  • Verified answer
    tagustin2020 Profile Picture
    on 07 Jul 2021 at 20:44:27
    Re: UPS, FedEx Tracking URLs

    @PrasadAthalye 

     

    Hello Prasad,

     

    I was able to figure out a solution. I am posting the steps here for anyone else who might benefit. These steps assume a basic knowledge of Power Automate.

     

    STEP 1: Turn on versioning settings in your Sharepoint list.

    SS1B.png

     

    STEP 2: Select the trigger "When an item or a file is modified" and map your site address and list.

     

     SS1.png

     

    STEP 3: Click the ellipsis dots in the upper right-hand corner (see screenshot above) and click on Settings to access this pane. Enter the expression shown in the Trigger Conditions field being careful to substitute your own column name (mine was Status) and Status Value (I have a SharePoint choice column, I chose the 'Shipped' value). 

     

    SS1A.png

     

    STEP 4: Insert a new step "Get changes for an item or a file (properties only). Map to your site address and list name. Enter dynamic content of ID and TriggerWindowStartToken.

    SS2.png

     

    STEP 5: Add however many parallel conditions you need (I had 4). For UPS and FedEx, I chose the dynamic field for the Shipping Method (a Choice column in my Sharepoint list) and chose the starts with option. I then entered UPS and FedEx in each of the respective condition steps. The UPS version is shown below. I crafted an email for the Yes and left the No blank.

    SS3.png

     

    STEP 6: I was able to use "is equal to" for Courier and Other.

    SS5.png

     

    Thank you for your help Prasad. I hope this solution helps someone else.

    Teresa

     

     

     

     

     

  • tagustin2020 Profile Picture
    on 05 Jul 2021 at 00:00:12
    Re: UPS, FedEx Tracking URLs

    @prasad 

     

    Hello Prasad,

     

    Thanks again for the advice. I watched Reza's video. I'm a big fan and have used many of his techniques in my apps, but I don't think this video was a match for my particular use case. I did find a post from Laura Rogers  and also a Community Post that suggest the "When an item or a file is modified" trigger that I think might be more inline with what I am trying to achieve, but I have a variation that I'm hoping you can help me with. Not only do I want to only send the email when the status is equal to "Shipped", but I also need to send out different emails depending on what shipping method was chosen. There are four options: UPS, FedEx, Courier or Other. Courier and Other are pretty straightforward, but I could use some help with StartsWith expressions for UPS and FedEx since users are able to select from a menu of options for each in an app dropdown called ShipVia (e.g. UPS Ground, UPS Next Day Air, UPS 2nd Day Air, etc.)

     

    Here is the update: I changed my trigger to "When an item or a file is modified". I clicked the ellipsis dots next to the trigger and entered the expression seen in screenshot 2. Finally I added 4 parallel conditions for each shipping option ( UPS, FedEx, Courier and Other) to check not only if the Status was equal to "Shipped", but also which of the 4 basic shipping options applies. Is that how you would do it? Please scroll down to SCREENSHOTS 3 and 4 to see an example of the UPS scenario. If you give me a StartsWith expression for this one, I should be able to figure out the FedEx expression. Would I just put "Other" and "Courier" in quotation marks?

     

    SCREENSHOT 1

    First2Steps SS.png

    SCREENSHOT 2

    TriggerConditionSS.png

    SCREENSHOT 3

    UPS SS.png

     

    SCREENSHOT 4

    UPS SS2.png

     

    Thanks for your help Prasad. I wish you and your family a happy Fourth!

    Teresa

     

     

     

  • PrasadAthalye Profile Picture
    4,795 on 03 Jul 2021 at 14:41:22
    Re: UPS, FedEx Tracking URLs

    When an Item is created OR modified should work. In the trigger, you can go to settings and add a trigger condition. You can check status = Shipped. Refer below.. Ensure that column name and value is correct. This way, flow will only run if status is shipped.

     

    @equals(triggerbody()?['ShippedStatus'], 'Shipped')

     

    Other option, I recommend is to use Power Apps Trigger in the Power Automate and invoke it based on your requirement from Power Apps. So when Status is changed within power apps, you can invoke the trigger. Refer Video from our community expert @RezaDorrani --> https://www.youtube.com/watch?v=emAhLzVG9bM 

     

    Lastly, I reviewed your email settings and they look fine to me.

     

  • tagustin2020 Profile Picture
    on 03 Jul 2021 at 00:03:24
    Re: UPS, FedEx Tracking URLs

    @PrasadAthalye 

     

    Hello Prasad,

     

    Thank you for the reply. Since I'm a beginner I was wondering if you could take a look at the screenshots and text I have below and give me the advice I need to complete the flow. I really appreciate Super Users like yourself helping the Community Members overcome final phase hurdles.

     

    After working on the flow a bit more I decided to simplify my original request. I would like to add a check for the Shipping Method to send out 1 of 4 emails based on whether whether the Shipping Method starts with UPS, FedEx, Courier or Other. That should be sufficient. I can customize the messages for each scenario. Since there are sometimes going to be multiple tracking numbers for a given request I'd rather avoid an overly complex situation and just provide a link to the generic tracking site. Our employees haven't had tracking info sent to them to date much less the generic tracking site link so I think they will view this as a vast improvement.

     

    Here is what my Logistics Team Member Screen within the Shipping app looks like. The staff member scans the shipping label barcodes, confirms the Shipping Method requested by the user hasn't changed, changes the Status to Shipped and finally clicks the blue button to send the email confirmation to the user. The first time the notification is sent it should be done only OnSuccess of the Power Apps form so I am currently using the "When an item is created or modified trigger". Is that the correct one to use? I don't want the flow to run every time, only when the Status is equal to Shipped so how do I need to modify the trigger to ensure that happens?

     

    Edit SS.png

     

    Here is the flow I have thus far. I have quite a few columns in my SharePoint list so I would like to only bring back the ones I need for the flow. I'm not sure how to do that. I can try Googling it over the weekend, but if you have any advice I would appreciate it. As previously mentioned, I'm not sure how to modify the trigger based on "Shipped" status. I wasn't completely sure whether to use Get item or Get items. Can you confirm I guessed right?

    Flow1.png

    As previously mentioned, after the Get item step I need some kind of test to see if the Shipping Method value starts with UPS, FedEx, Courier or Other so I can send the emails appropriately. I was thinking it might be easiest to create 4 different email branches based on the results of that flow step. A UPS email example is below.

     

    This is the only version of the email I have created at this point. Before I go any further I was hoping if you could take a look and let me know if it looks right. I put my email address in the "Send As" for now, but plan to change it to an Office365 Logistics email address prior to launch. Any caveats I should be aware of?

     

    Thanks again Prasad. I hope you have a nice holiday weekend. I'll be working on my Power App and Flow Saturday-Monday so if you have a chance to respond I'll be watching for your reply. Hopefully you are not a hopeless workaholic like me and will be taking some time off. Let me know if there is any additional information I can provide that will help you help me. Kind regards, Teresa

     

    Flow2.png

     

  • PrasadAthalye Profile Picture
    4,795 on 02 Jul 2021 at 21:20:18
    Re: UPS, FedEx Tracking URLs

    So are you invoking Power Automate Flow from Power Apps ? If yes, you can pass parameters of Dropdown selection and the tracking number.

     

    Then within Power Automate, You can use Conditions to generate deep link by concatenating strings. Finally send email. 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started