Asansol, Coca Cola Distributor Transform their Business with PowerApps

By Dipak Shaw

August 2, 2019


Microsoft, PowerPlatform

The Scenario for this app is “There is a Coca cola Distributor which provides refrigerator to their retailer After purchasing
huge amount of products by the distributor, so the company sends Quarterly service person to check whether their given
refrigerator is working good or not, If everything is fine the serviceman update their quarterly data status with “Okay” and if
some repair need then he will update the data regarding that repair and then the company will arrange a repair for that
retailer.

How it Works

I created a Canvas App which is connected to sharepoint list to store and edit details of refrigerator given to all retailers. Also I use CDS to store the quarterly survey data. This Data is collected by the service person and distributors will take decision of repairing that refrigerator by this data.

I also use Flow to automate to send an email to retailers regarding the person who will going to repair and estimated date of repair or if there machine status is okay then this will also sent by an email.

The Beginning(Canvas App)

At first, I created an Canvas App by taking data from Sharepoint List. There is Three screens defining 1. Main Screen, 2. Details Screen and 3. Edit Screen.
 In the first screen i.e., Browse Screen I use gallery control to sort all the retailers in a list. Here we can select any of retailer and see their details in Details Screen, also in this screen we can add new retailer by pressing the “+” Button on the top right corner, it will redirect us to Edit screen in a blank form which will discuss in later screen.
Next, I create a Details Screen to show the full details of the retailers. In this screen the retailer details are shown by the following columns i.e., “Title”, “Retailer Name”, “Retailer Code”, “Retailer Status”, Retailer Area” and “ Retailer Address”. [As shown in the picture 2]
At first, I am creating an Canvas App by taking data from Sharepoint List. There is Three screens defining 1. Main Screen, 2. Details Screen and 3. Edit Screen.
 In the first screen i.e., Browse Screen I use gallery control to sort all the retailers in a list. Here we can select any of retailer and see their details in Details Screen, also in this screen we can add new retailer by pressing the “+” Button on the top right corner, it will redirect us to Edit screen in a blank form which will discuss in later screen.
  Therefore, In the third screen i.e., Edit Screen which enables us to edit the existing data or we can also Add any new data(As discussed in the screen 1).In this screen we have an option to edit those columns referred in Details Screen  [ Refer picture 3 ]

Main Screen
Details Screen



Edit Screen

These above are the sample Snaps of the above discussed Screens.

Use of Common Data Service

In this second phase I use CDS to store all Survey Data taken by our service persons. For taking surveys quarterly and proceed with the further operations like automating flows and taking decision we need some required fields like Retailer Name, Owner, Created By, Date Created and Comment
1. Retailer Name:- Name of the Shop, This field’s text input is automatically filled with the default value of its
        textInputBrowsegallery.selected.retailer.
And you can see in the above pic that editing option is disabled for that field, this is because the same data must be updated in CDS, otherwise if the service person entered some different data than listed retailers data it will be difficult to take decisions. For doing this I change the Display Mode-
        Display Mode DisplayMode.Disabled
2. Owner Name:- Name of the owing shop’s owner. This data is also update as the service person goes on the survey screen. In this field’s text input I use the Syntax
        TextInputBrowseGallery.Selected.Owner
This Field is also not editable because we need the exact owner name to confirm all the details.I used the same display mode formula for this field
        Display Mode DisplayMode.Disabled
3. Created By: – This field shows us by whom the record is created i.e., the service person who is at the place. In this field his email will be shown. This Field is also in auto filled mode so that service person can’t change his email.
        TextInputOffice365users().Email
        DisplayModeDisplayMode.Disabled
4. Date Created: – This field is using to show the data creation date so that distributor has record when any request is taken. The date is set automatically. That means the default date function is set to
        DefaultdateToday()
Also the display mode is set to disabled like above fields so that company gets the right date of request and provide better service

Using of Flow

In this app I also used Flow to automate some process, let’s check it out what those triggers and actions are. After all this process our retailers need some confirmation mails and also we need an action to approve or reject their repair request so for doing this we use flow here.
1. I created flow from blank, our trigger is CDS where the survey data is stored so we search for Common data services in flow editor and select “When data is created” after that we need to select environment and the entity also our Scope must be within the organization.
2. Click on Next step and search for Approval and select Start and wait for an approval(V2) and select the approval type “Approve/Reject – First to respond” and then enter the title for the approval and select by whom it will approved.
3. Click on the Next Step again to add an Condition, Search Control and click on Condition and choose the value from Dynamic content “Responses” i.e., a part of Approvals, after that the middle value will be “is equal to” and the third value is “Approve” in text not the Dynamic Content.
4. The Condition Action creates two action Yes and No i.e., when the approval is accepted it will trigger the yes Action and if the approval will reject it will trigger the No action in Both Cases we need to do two things, updating the CDS data by the given Approval Status and Sending an email to retailers containing information about their approved or reject status.
a. For Yes, we must add action of updating data in CDS. Search for CDS and select Update a record and then select environment, entity and then choose the Approval status to Approve.
Click on add action and select “Office 365 outlook” and select action “Sent an email”
      For “To” enter Retailer Email from dynamic content, after that enter the subject for approved and the messages we want to send our retailer like “Congratulations! Your request is approved successfully”
b. For No, All the action will be just same as yes but the approval status of the “CDS-Update a record” will be Rejected and the Email Subject will be changed to rejection expression and also the body of the message will be changed like “Sorry! Your request is rejected.”

Your Flow will look like this.



And Now, that’s the end of the post. If you have any query comment below.


Discover more from Power Solution

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Discover more from Power Solution

Subscribe now to keep reading and get access to the full archive.

Continue reading