Adding a Campaign

You can create a campaign to run specific tasks on one or more things. You can create a flowchart to perform a set of operations on multiple things.

When you add a new campaign, you can use the following to manage the space on the canvas:
Note:

You can clone an existing campaign and use it as a starting point to create a new campaign. The cloned campaign screen appears with the auto-assigned name (name of the parent campaign along with the date and time).

Trigger Icons

Description

Pan mode enables you to scroll horizontally and vertically across the canvas. While in pan mode, press CTRL and one or more nodes to select and deselect multiple nodes.

Select mode enables you to select one or more nodes to reposition them on the canvas. When you drag from left to right, any node that intersects your lasso is selected. When you drag from right to left, only nodes that are enclosed by your lasso are selected.

Fit trigger enables you to fit the trigger on the canvas.

  1. Click Developer, and then on the Developer page, click Campaigns.
  2. On the Campaigns page, click New campaign.
  3. In the Name box, type a unique name and optionally, in the Description box, type a description.
  4. (Optional) In the Max in progress box, type a number to specify the maximum number of things on which the campaign task can execute at the same time.
  5. Click on the Reporting mode drop-down list to select the mode required to generate the reports.

    Valid values are as follows:

    • Off: No campaign actions will be reported.

      On: All campaign actions will be reported. When On is selected the campaign actions are reported for the next 30 days, and later reporting mode automatically switches to the default On failure mode.

      On failure (default): Only actions that have failed will be reported.

  6. Click Email notifications. Enter the email address or notification group key to send email notifications. Select one of the following options:
    Email Notifciations
    • Enable daily: To send daily updates about the campaign.

    • Enable end notice: To send an end of campaign notification.

    For more information about notification group keys, see Notification Groups.

  7. (Optional) Click Advanced if you want to define the Campaign using JSON. It is recommended to use the Standard option.
  8. On the canvas, right-click the Start node. The Add campaign window opens.
    Creating a Campaign
    1. Select the Campaign type from the drop-down list:
      • campaign.connection: to run the campaign on a set of connections

      • campaign.thing: to run the campaign on a set of things

    2. Click Add.
  9. From the Action list, select one or more of the supported actions as follows:
    OptionDescription

    method.exec

    This task executes a method defined in the selected thing definition on all things that included in the campaign. If things do not support the selected method, the campaign fails on those things.

    1. From the Thing Definition drop-down list, select the thing definition of the things to add to the campaign.

      Add method.exec
    2. From the Method drop-down list, select the method to execute.

    3. If the method requires parameters, type or select the values as needed.

    4. In the Thing Key field, enter the key of the Thing that is added to the campaign.

    5. In the Ack Timeout box, type the time in seconds (maximum 300) to wait for the campaign to complete.

    thing.tag.add

    1. In the Add thing.tag.add window, enter the Thing key in the box.

    2. Select or type the name of the tag to add to all things in the campaign.

    Add thing.tag.add

    thing.tag.delete

    1. In the Add thing.tag.delete window, enter the Thing key in the box.

    2. Select or type the name of the tag to delete from all things in the campaign.

  10. Click Add.
  11. Drag the arrows from the colored edge to connect the nodes.
  12. Connect a Success node at the end of the route.

    You must have at least one success route to save the campaign.

  13. In the lower-right corner of the page, click Add.