Category Archives: Cloud flows
Transforming Return Logistics for a USA Manufacturer: Automating Shipment Processing with Dynamics 365 Customer Service
Summary This blog highlights the integration of Microsoft Dynamics 365 Customer Service Hub with FedEx Shipping Manager to handle automated email return shipments for a consumer electronic appliances company based in Massachusetts, USA. In the original process, customer service representatives were required to manually register each return shipment through the FedEx Shipping Manager portal. This process involved copying customer details, creating shipments, generating labels, and capturing tracking numbers ā a workflow that typically required 20ā30 minutes per request. The integration project automated the entire return shipment process directly within the Dynamics 365 Customer Service Hub. With a single click, the system now registers the shipment using FedEx Shipment APIs, generates a return label, captures the tracking number, and updates the case record automatically. This innovation eliminated the need for agents to switch between systems and reduced shipment registration time from 20ā30 minutes to just a few seconds, significantly improving operational efficiency and the overall customer service experience. This blog explains: 1] The operational challenges caused by manual shipment registration. 2] How Dynamics 365 Customer Service Hub was integrated with FedEx Shipping Manager. 3] The functional workflow used to automate shipment creation. 4] How customer service representatives trigger shipments directly from CRM. 5] The business impact achieved through automation and system integration. Table of Contents 1. Customer Scenario 2. Solution Overview 3. Functional Implementation Approach 4. Email Return Label Experience 5. Handling Complex Data Automatically 6. Business Impact 7. Preview Video 8. Final Thoughts Customer Scenario A Massachusetts-based consumer appliance manufacturer known for building innovative kitchen technology was experiencing a growing operational challenge in its customer service operations. As demand for its products increased across major retail channels, the number of customer support cases related to product returns and replacements also grew significantly. The companyās customer support team handled all service requests through Microsoft Dynamics 365 Customer Service. However, when a product needed to be returned for inspection, replacement, or warranty evaluation, agents were required to manually create a shipment in FedEx Ship Manager. This manual process involved several steps: 1] Opening the customer case in the CRM system 2] Copying customer information and shipping details 3] Logging into the FedEx portal 4] Registering the shipment manually 5] Generating a return label 6] Capturing the tracking number 7] Returning to CRM to update the case Each shipment registration typically took 20ā30 minutes. When hundreds of return requests were processed weekly, this created several operational challenges: 1] Agents constantly switched between multiple systems 2] Manual data entry increased the risk of errors 3] Customer response times increased, leading to customer resentment 4] Tracking information was not always immediately available in the case record The organization needed a more efficient way to handle returns while keeping the entire process inside their CRM platform. Solution Overview To streamline the returns process, I implemented an integration between Microsoft Dynamics 365 Customer Service and FedEx shipping manager services. The goal was simple: Allow customer service representatives to generate a return shipment directly from the case record with a single click. Instead of navigating to the separate external shipping portal, agents can now initiate a return shipment directly from the CRM case page. Once triggered, the system automatically handles the entire shipment (Email/Return/Label) registration process. With this solution in place, the workflow now looks like this: A customer contacts support regarding a product return via their website, which registers an associated Case record in D365 Case Management (via existing case automation). The support agent opens the case in Dynamics 365. A āCreate Return Shipmentā button becomes available when the case meets the required conditions, e.g., Case Stage, RMA availability, Region of Customer, etc., thus validating and restricting shipment privileges. With one click, the system registers the shipment with FedEx (via appropriate FedEx Shipment APIs, as per customer requirements). The shipment tracking number is automatically captured and stored in the case record. This tracking number is useful for the customer support team as well as the customer to check the progress of the shipment on the FedEx Shipping Manager portal. The customer receives an email return label that they can print and attach to their package. FedEx Email Return Shipment Process Flow This transformation reduced a 20ā30 minute process to just a few seconds. Functional Implementation Approach The implementation focused on simplifying the experience for customer service agents while maintaining strict control over when and how shipments could be created. Intelligent Shipment Trigger Visibility Within the CRM case interface, the return shipment button appears only when specific conditions are met. This ensures that shipments are created only for valid return scenarios. Examples of conditions include: The case must have an approved return authorization The case must be in an appropriate service stage The customer address must be eligible for shipment Required customer information must be available Example: Return Shipment Trigger inside Dynamics 365 Customer Service Hub By embedding these conditions into the CRM interface, agents are guided through the correct service workflow without needing to remember complex procedures. Automated Shipment Creation Once the button is clicked, the system automatically gathers key information from the case record, such as: Customer details Shipping address Product description Return authorization number Contact phone number This information is then used to register the shipment through the FedEx shipping system. The system generates: A unique shipment tracking number A return shipment registration A digital return label The warehouse where the shipment would reach based on the product and end consumer requirement ā e.g., return, replacement, or repair of the product Example: A Successful Return Shipment to a specific warehouse. Example: Tracking a Return Shipment using the Tracking No. updated on D365 Customer Service Hub. Example: The FedEx Shipping Manager for Tracking the Integrated Shipments. The tracking number is immediately written back to the case record in Microsoft Dynamics 365 Customer Service, ensuring that support agents can track the return shipment without leaving the case. Email Return Label Experience After the shipment is registered, the customer automatically receives an email containing their return label. … Continue reading Transforming Return Logistics for a USA Manufacturer: Automating Shipment Processing with Dynamics 365 Customer Service
Share Story :
Exposing Plugins as Bound Actions for Power Automate Flows: A Practical Procedure for Efficient Record Processing, involving several records.
In complex business processes, like calculating commissions or validating data across multiple records, applying the same logic repeatedly in a Power Automate flow can quickly become inefficient and difficult to maintain. A more scalable approach is to encapsulate the logic in a Dataverse plugin, expose it as a bound action, and then call this action from a flow. This method centralizes business rules, reduces redundancy, and improves maintainability. In this post, weāll walk through the steps to implement this approach and examine its advantages over applying the same logic directly within a flow for each individual record. Weāll illustrate this with a practical example from a Houston-based technology consulting and cybersecurity services firm that specializes in modern digital transformation and enterprise security solutions. Flow Diagram Step 1: Create the PluginThe first step is to write a plugin that contains the logic you want to apply to each record. Example: DuplicateCommissionsCounter Step 2: Expose the Plugin as a Bound ActionInstead of running plugin logic manually for each record, you can register it as a bound action in Dataverse. Procedure: E.g. 2. Attach your plugin to this action. Outcome: This exposes your plugin logic as a reusable, callable bound action. Any process or flow can now invoke it for a specific invoice record. Step 3: Use Power Automate to Call the Bound ActionOnce the plugin is exposed, you can loop through multiple records in a flow and call the action. Procedure in Power Automate: This approach ensures that all complex logic resides in the plugin, while the flow orchestrates which records need processing. Advantages Over Logic Directly in the Flow To conclude, exposing plugins as bound actions is a robust, maintainable way to apply complex logic across multiple records in Dataverse. It allows Power Automate flows to focus on orchestration rather than logic execution, leading to cleaner, faster, and easier-to-manage solutions. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Share Story :
Trigger Power Automate Flow using JavaScript ā Bi-Directional
Hi All, This blog will be a continuation of my previous blog – Trigger Power Automate Flow using JavaScript – Uni Directional Now, feedback is essential when sending a request to determine whether it was successfully performed or failed somewhere. You can accomplish this by forwarding a response back from where the flow was invoked. I’ll use the same situation as in my previous blog, where I send a notification by greeting a person’s name if exists, or else I will greet a friend. Check out my previous blog to learn how to build your Flow and JavaScript. Steps to pass the response back within Flow
Share Story :
Trigger Power Automate Flow using JavaScript – Uni-Directional
Hi All, Did you know you can use JavaScript to trigger Power Automate flows and pass input data? So, I’ll show you how to do that, as well as how to pass strict structured data and dynamic schema in Power Automate. In the next blog, I’ll talk about Trigger Power Automate Flow using JavaScript ā Bi-Directional Steps to follow for Initial Setup Step 1: Let’s create a Power Automate Flow and define the input JSON schema.Go to: Power Automate Create an Instant Flow with the trigger ‘When a HTTP request is received‘ Step 2: Let’s outline the input schema and then focus on the output in a ‘Compose’ block. I’ll describe two types of inputs. (Strict and Dynamic).Our strict schema will be identified by a specific pattern indicating how the input should be given.Our dynamic schema will be recognised by an unknown pattern, and input will not always be fixed. Click on ‘Use sample payload to generate schema’. Apply the following code, click on Done and you will see the schema in ‘Request Body JSON Schema’. Add a Compose Block to check the output of the request and save the Flow. URL will be generated and is ready to be used. Let’s now proceed to create JavaScript to trigger this flow Steps to follow for calling Flow using JavaScript Since I’ll show the code snippet, adjust it as per your use case. Note: Copy your HTTP Post URL from the trigger as it will be used in the JavaScript Step 1: Type the following code Step 2: Execute the JS with ‘TriggerFlow.Main()‘. Note: Make sure you pass Execution Context to the JS Step 3: Check your Power Automate Flow History and open the Run. That’s how Power Automate is triggered using JavaScript. Hope this has helped you š Next blog – Trigger Power Automate Flow using JavaScript ā Bi-Directional
Share Story :
Remove duplicate values from an array using Power Automate Flow
Hello everyone! In this blog, we will demonstrate how to schedule a flow that sends emails to all the owners of opportunities using Power Automate Flow. Scheduled flows are the best option for actions that need to be automated on a schedule and will run at a specific time or date. For instance, using this approach, you might schedule a daily data upload to Dynamics 365 or SharePoint. Use Case: Power Automate flow sends a reminder notification to the owners of Opportunities. To avoid multiple emails being sent to the same owner, we need to remove duplicate email addresses. Step 1: Log in to the required Power Apps environment using URL make.powerapps.com by providing username and password, click on Create on the left-hand side as shown below, and click on Scheduled cloud Flow. Step 2: Mention the date and time. It will appear as this. Step 3: Initialize a variable ‘Email_addresses’ of type Array which will store all the email addresses. Step 4: Use List Rows to find the desired records from the required table. Select the table name. Also, I added the FetchXML code to fetch the required details of an entity. Step 5: Add an ‘Apply to Each’ loop and insert the previous step’s value. This is done so that the value in every iteration is stored in the Array Variable. Add a step of ‘Set variable’ to store the email addresses in the Array. Step 6: Add a new step ‘Compose’ and declare an empty array. This helps to save time when comparing with larger sets. Step 7: Apply the Union function which removes duplicate values. union(variables(‘Email_addresses’),outputs(‘Empty_Array’)) Step 8: Apply the Join function to extract the email addresses. join(array(outputs(‘Union_function_to_remove_duplicate_mail_Values_in_Array’)),’,’) Hope this helps!
Share Story :
Set multiple not resolved Email Ids as To Party CC Party & Bcc Party in D365 Email Message records using Cloud flows
Many a time it happens that we need to send emails that may be an email notification etc. to clients, with the power automate capabilities we can schedule, trigger, manually run, and do want not to automate these notification emails. But the road blocker to all of these is not resolved email IDs, i.e. email IDs that cannot be resolved as Contacts, Accounts, Users in CRM. We need to make changes to system settings to allow messages to these unresolved Id we have already covered this in the Blog : [https://www.cloudfronts.com/power-automate/send-email-to-not-resolved-email-ids-from-workflow-cloud-flows/] In this blog let’s see how we can set multiple not resolved Email Ids as To Party CC Party & Bcc Party in D365 Email Message records using Cloud flows ToParty, CCParty, BccParty are all Activity Parties and they have a ParticipationTypeMask integer value associated with them more on Activity Parties and Types in this link [https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/activityparty-entity?view=op-9-1] ParticipationTypeMasks are as below : Sender : 1 ToRecipient: 2 CCRecipient: 3 BccRecipient: 4 In Cloud flow create a new email record, click on āSwitch to Input entire arrayā, populate the email in the address used field and ParticipationTypeMasks as shown below : Hope this helps! Thank you
Share Story :
Get year from Current date & Time function in Cloud Flows
We wanted to get the current year but there is no direct expression only to get the year. Below is the solution where we get the current year. Use formatDateTime function function with Utcnow(). Below is the expression we used. formatDateTime(utcNow(),’yyyy’) Output – Expression to get current date formatDateTime(utcNow(),’dd’) 2. Expression to get the current Month formatDateTime(utcNow(),’MM’) Hope this helps!
Share Story :
Creating HTML table using Power Automate
The Create HTML Table action in Power Automate is a useful tool, but lacks any formatting or styling options. In this blog, we’ll see how to create a HTML table in Power Automate. Use Case: When quote is marked as won, close opportunity as won and send Email to the owner of the Opportunity with below details – Email Subject – Opportunity Won! Email Body – Customer Name – Below Table- Solution:Step 1-The requirement is quote should be modified and marked as Won. Trigger on When Quote Modified. Step 2- Initializing the customer with variable actions Step 3- Put a condition that the trigger works only when quote is Won (status code=4), then change opportunity to Won. Step 4- On quote status marked as Won, update the opportunity as Won. Step 5- Listing Accounts associated with Opportunity Step 6- Use Compose: Data Operation and enter the required record URL. Edit the Id by entering the opportunity Id from dynamic content. Similarly for quote URL details as well. Step 7- Using select operation to create a required table in the given format. Using href tag place the outputs of opportunity link and quote link in the key section respectively. Step 8- Create a HTML table and enter the output table of select operation. Step 9- Create 3 new steps using Compose operation to remove the unrequired part of the URL using replace expression. Step 10- Create a new step using compose operation and enter the required CSS style for the table to be sent in the mail and attach the final output in the inputs. Step 11- Send an Email and enter the final output in the Email body. Step 12- Email sent This is how we create HTML table in Power Automate. Hope this helps!!
Share Story :
[Solved] The supplied reference link is invalid in Cloudflows
Introduction: When we add a new row in dynamics CRM, we might end up using the lookup data reterived in previous action. There might be times when the previous record has returned a null. In such cases we get the error- { “error”: { “code”: “0x0”, “message”: “The supplied reference link — contacts() — is invalid. Expecting a reference link of the form /entityset(key).” } } For this example; I was creating a new record and wanted to use the Account and its contact as lookup in my new record. The reterived Account did not have a contact and so my flow failed. Solution: Use the below if condition, In this condition- we are checking if the reterived contact is empty, if yes we are setting the lookup field to blank else we are setting the lookup value. Note: Please remove and add the quotes/ commas again ; if you are copy pasting the condition in your flow else it might show invalid expression.
Share Story :
Read items from Array in Power Automate
Let us consider we have array [1,2,3] and want to read each value in Power automate. Let see how we can read array in Power Automate Step 1- Create array (here you can use your array) Here I have array [1,2,3] and now I want read each value of array in loop Step 2 – Add apply to each step In a apply to each step, Add output of array. In this case we have compose. Step 3 – Add action compose and use expression item() to read array from compose Now Save and try to run the flow. In this way you can read value from array in Power Automate