Example: Using Azure Actions
For a shipping company to detect customer complaints about damaged packaging, and then automate their response, the workflow consists of the following actions:
Step 1: Add and configure an Office 365 trigger to get a new customer email
The following steps provide details of the values that you need to specify in the action form for this specific example. For detailed steps on configuring this trigger, see Office 365 Triggers.
1. In the Select Trigger list, select New Email.
2. In the Folder ID field, select Inbox.
Step 2: Use LUIS Prediction to verify whether the email is a complaint about damaged packaging
The following steps provide details of the values that you need to specify in the action form for this specific example. For detailed steps on configuring this action, see LUIS Prediction.
1. In the Query field, map the value of Subject from the Office 365 trigger data.
Step 3: Use Text Analytics to detect sentiment of the email
The following steps provide details of the values that you need to specify in the action form for this specific example. For detailed steps on configuring this action, see Text Analytics.
1. In the Select Specific Service list, select Sentiment Analysis.
2. Under the Documents section, click Add, and do the following:
In the Text field, map the value of Body Content Text from the Office 365 trigger data.
In the Language list, select the language of the input text.
Step 4: Add a condition between LUIS Prediction and Text Analytics
The following steps provide details of the values that you need to create a condition for this specific example. For detailed steps, see Setting conditions between two actions.
1. Click the line between LUIS Prediction and Text Analytics to define a condition.
2. Define the condition as shown in the following image:
Step 5: Execute the Execute Logic App action in response to the customer complaint
The following steps provide details of the values that you need to specify in the action form for this specific example. For detailed steps on configuring this action, see Execute Logic App.
1. Create a logic app with a HTTPWebhook trigger and the following inputs:
Customer Email
Customer Name
Complaint Sentiment
2. In ThingWorx Flow, in the Execute Logic App action form, select the appropriate Logic App defined in your subscription and the Trigger present in the logic app.
3. Under the Properties section, map the outputs to the following fields:
Customer EmailFrom Email of Office 365 Trigger Data.
Customer NameFrom Name of Office 365 Trigger Data.
Complaint SentimentScore of the Text Analytics action.
Now, if an email complaint is received by a shipping company, the complaint is automatically detected, the system detects if the complaint is about damaged packaging, and an automated response is sent to the customer.
Was this helpful?