The Internet of Things on AWS – Official Blog

How to route messages from devices to Salesforce IoT Cloud

AWS IoT customers can now route messages from devices directly to Salesforce IoT Cloud with a new AWS IoT Rules Engine Action that requires only configuration.

As part of the strategic relationship between AWS and Salesforce, the combination of AWS IoT and Salesforce IoT Cloud allows you to enrich the messages coming from your devices with customer data residing in Salesforce. This results in deeper insights and allow customers to act on those newly created insights within the Salesforce ecosystem.

In this article, we are going to walk you through a step by step example so you can learn how to configure and test this new action type.

Bring case management to your connected devices

We are going to take an industrial solar farm as an example, which is inspired from a demonstration that took place at Re:Invent 2016.

This demonstration showcases AWS IoT-connected products reporting a critical failure. As a result, a new record in the case management system gets created in Salesforce Service Cloud which instructs a technician to go on-site, assess the situation and make repairs.

To learn more about it, visit the AWS YouTube channel.

Create an AWS IoT Rule with a Salesforce action type

Start by logging into the AWS IoT console.

Click on the Rules section and select Create a rule.

 

Name your rule solarPanelTelemetry and then enter a meaningful description.

We will create a simple rule to forward all the data coming from a solar panel to Salesforce IoT Cloud. Enter * as the Attribute of the rule to allow all data coming from the device to be passed on. Enter solarPanels/D123456 as the topic filter and leave the condition field blank.

Once you’re done click on Add action.

 

Select the Salesforce action type and click on Configure action.

Go to the Salesforce IoT Cloud console and copy/paste the value displayed on the Input Stream for the URL and the Token. To learn more about Input Streams please refer to the Salesforce documentation.

 

Click on Add action and review the AWS IoT Rule. You should see the Salesforce action you just added. Click on Create rule.

 

Test your configuration

We are going to test the AWS IoT Rule we just created by simulating a message coming from a solar panel. Go to the Test section of the AWS IoT Console.

Enter solarPanels/D123456 as the Subscription topic and push the Subscribe to topic button. This will enable you to verify that the sample message you are sending is published to the topic matching the rules’ configuration.

Next enter solarPanels/D123456 for the topic name in the Publish section and copy/paste the following JSON:

{
  "deviceId": "D123456",
  "volts": 70,
  "amps": 1.5,
  "watts": 90,
  "latitude": "45.0000",
  "longitude": "-122.0000",
  "timestamp": "1493750762445"
}

Finally, push the Publish to topic button to send the message.

If you want to monitor the rule’s execution, you can set up Cloudwatch Logs for AWS IoT.

 

Log into the Salesforce IoT Cloud console to see the message that was sent from AWS IoT.

 

Next steps

Refer to the AWS IoT developer documentation for more information on how to use this new action.

Or, sign into the AWS IoT console to try it.

To learn more about AWS IoT, visit the AWS website. To learn more about Salesforce IoT Cloud, visit the Salesforce website.