Показать сообщение отдельно
Старый 03.01.2019, 02:30   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
powerobjects: PowerApps: Sending Text Messages
Источник: https://www.powerobjects.com/2019/01...text-messages/
==============


So much can be accomplished with PowerApps! In today’s blog post, we will walk you through the incredibly simple process of using PowerApps to send text messages with prefilled content using your own phone’s native messaging app. It’s just one example of the potential of PowerApps.

With PowerApps, we can generate text messages in a couple different ways:

  • Using a Flow to send an automated message. Typically, this requires the use of a 3rd party action in Flow which will incur additional costs.
  • Using the sender’s own device to send the message through its native texting application. This option uses existing carrier rates to send the text message, which for most plans is free due to unlimited texting – therefore, it is the preferred method.
You can even configure the body of the text message in PowerApps to make the whole process only two clicks:



1. Click the Send on-route text message button in Power Apps.

2. Click Send.



Slick, right? Now let’s look at how we can automate this process with a very simple formula.

1. In the “OnSelect” event of our button, we will add the Launch() formula Launch(Address, Label, value). As the name suggests, Launch is used to open or launch an application on your device – it could be your phone’s native SMS/texting app, a phone call app, or even a browser. In our example, we will pass the SMS: along with the customer’s phone number in the Address parameter and then pass “body” in the Label parameter to denote the location of pre-populated text of our choice, which is the Value parameter. The pre-populated text is a concatenated string of text along with fields from the Customer record to personalize the message.



2. Note that in terms of the necessary code, there is a slight difference in the syntax between IOS and Android devices. Android follows the comma-separated syntax describe above: Launch(Address, Body, Content). However, Apple devices use a slightly different syntax that uses ampersands (&) and equal signs (=) instead of the commas, yielding the following syntax: Launch(Address & Label=Content). To handle the specific syntax for Apple, we concatenate the three Launch parameters into the first (Address) parameter. We add the ampersands and equal sign syntax into the string and the Apple device will interpret the syntax and will open a new message.
  • Android: Set the syntax by using the format provided in the hover over, which is Launch(Address, Label, value). Below is the Android syntax used in our example:
    Launch(“SMS:”& Gallery1.Selected.address1_telephone2, “body”, “Hey ” & Gallery1.Selected.name & “! We are en-route to your location for the appointment. We will be there in less than an hour!”)
  • IOS: The entire syntax is located in the address parameter of the Launch formula , with the ampersand and equal sign being passed after the telephone number as part of the body string (highlighted below):
    Launch(“SMS:”& Gallery1.Selected.address1_telephone2 & “&body=Hey ” & Gallery1.Selected.name & “! We are en-route to your location for the appointment. We will be there in less than an hour!”)
So, there you have it! Although simple, the Launch formula can help you not only automate your processes, but also save you a lot of money by using your carrier’s (unlimited) texting plan.

Tip: You can also use the Launch() function without the “body” seen in the examples above. If you just say Launch(“SMS” & Gallery1.Selected.address1_telephone2), it will launch the SMS/texting app on your phone with the customer’s phone number filled in. This gives you the ability to seamlessly transition from the PowerApps to your native texting app to send personalized messages to your customer.


We hope this helps. Don’t forget to subscribe to our blog for more!

Happy PowerApps’ing!



Источник: https://www.powerobjects.com/2019/01...text-messages/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.