Alpha Help Center

Macros

Macros are trigger queries that have been saved and can be use with other triggers.

The Macros page lists all the macros that have been added to the system and can be accessed from left menu pane of the Triggers page. If you do not see the left menu pane, swipe to the left browser edge to show the menu.

Sort macro details

Create

You can create macros in a couple ways: while you add or edit a trigger, from the Triggers page or the Macrospage.

While adding or editing a trigger

  1. After you build the query for a trigger, click Save as macro.
  2. In the following dialog, enter a key for the macro.

    A macro key is the string that would be used to call the macro.

    The macro key is always prefixed with macro_ and must be unique.

  3. Click Yes.
  4. The query for the trigger is replaced with the new macro.

The new macro is automatically added to the Macros page, and uses the key as the name of the macro. If you need this macro to be available across projects, you will need to edit the macro and enable the Global setting.

From Triggers page

  1. On the Triggers page, locate the trigger that uses a query that you want to save as a macro.
  2. At the right-end of the row, select > Create macro.

    The Macro details page is displayed and the Macro query area is populated with the CQL query from the original trigger.

  3. Enter a name for the macro.

    By default, the name of the macro is used to populate the key.

  4. If you want the key to be different from the name, enter a different value into the Key field.
  5. Enter a description for the macro.
  6. If the macro needs to be available across all projects in the system, click to enable the Global setting.

    This setting is disabled by default.

  7. In the Macro query area, make any changes that may be required.
  8. Click Save.

The new macro is added to the Macros page.

From Macros page

  1. On the Triggers page, click Macros from the left menu pane.

    If you do not see the left menu pane, swipe to the left browser edge to show the menu.

  2. In the top-right corner of the Macros page, click Add macro.
  3. On the following page, enter a name and key for the macro.
  4. Enter a description for the macro.
  5. If the macro needs to be available across all projects in the system, click to enable the Global setting.
  6. In the Macro query area, enter the CQL values for the macro.
  7. Click Save.

Edit

  1. On the Macros page, open the Macro details page.
    • Click the macro name.
    • At the right-end of the macro row, select > Edit.
  2. On the following page, make any required changes.
  3. Click Save.

Duplicate

NOTE: Not available for Global macros.

  1. On the Macros page, locate the macro you want to duplicate.
  2. At the right-end of the row, select > Copy macro.
  3. In the following dialog box, select the current project.
  4. Click Copy macro.

A copy of the macro is added to the Macros page. The date and time it was copied is appended to the macro name.

Copy macro to a different project

NOTE: Not available for Global macros.

  1. On the Macros page, locate the macro you want to copy.
  2. At the right-end of the row, select > Copy macro.
  3. In the following dialog box, select the project you want to copy the macro to.
  4. Click Copy macro.

A copy of the macro is added to the selected project's Macros page. The date and time it was copied is appended to the macro name.

Delete

You cannot delete a macro unless there are no triggers using it.

  1. On the Macros page, locate the macro you want to delete.
  2. Click a macro to expand the row to show the list of triggers that are using the macro.

    Tip: If the macro does not expand, there are no triggers using the macro.

  3. Remove the macro from each of the listed triggers.

    To remove a macro from a trigger, edit the trigger and remove the macro listed in the Trigger query builder.

  4. When there are no more triggers listed under the macro, select > Deletee.
  5. When the confirmation dialog is displayed, click Yes.