Example: Using Dynamics 365 CRM Actions
Suppose you have a requirement where you need to get the customer asset code from Dynamics 365 CRM, and then send it as an SMS to the operator. For this use case, the workflow would consist of the following actions:
Step 1: Configure ThingWorx trigger
Let us set up a ThingWorx trigger that fires off each time an alert is created in ThingWorx.
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
ThingWorx Triggers.
1. In ThingWorx Composer, create a ThingWorx Thing entity, for example, DynamicsThing with the following details:
▪ assetId property
▪ alertProperty property
2. In
ThingWorx Flow, place the pointer on the start icon
, and then click
or double-click
. A list of triggers appears.
3. Select ThingWorx to configure the ThingWorx trigger.
4. In the Source Entity list, select your ThingWorx source entity, DynamicsThing.
5. In the Event list, select Alert.
6. In the Source Property list, select the alert property, alertProperty.
Step 2: Use the Get Thing Properties action to get asset ID from ThingWorx
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
Get Thing Properties.
1. In the Find By list, select Selection.
2. In the Thing list, select your ThingWorx source entity, DynamicsThing.
3. In the Property list, select assetId.
Step 3: Use the Get Records action to get records from Dynamics 365 CRM
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
Get Records.
1. In the Find By list, select Query.
2. In the Entity Set list, select Customer Asset. This entity set must be available in your authorized Dynamics 365 CRM account.
3. In the Query Type list, select Form-Based Query.
4. In the Join By list, select and.
5. Click Add to add a filter:
a. In the Property list, select Customer Asset ID.
b. In the Condition list, select Equals.
c. In the Property Value field, map the assetId output of the Get Thing Properties action.
Step 4: Use the Send an SMS action to send an SMS to the operator
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
Send an SMS.
1. In the Message field, map the statuscode output of the Get Records action.
Now, whenever the asset ID is retrieved from Dynamics 365 CRM, an SMS is sent to the operator about the asset status.