Alloy includes an ability to launch Alloy Actions using Siri by speaking certain phrases, associated with that specific Actions. It is possible to add two types of Shortcuts:

  • Foreground: Alloy app will be activated and corresponding Action will be launched.
  • Background: corresponding Action will be launched in background without leaving Siri and the Action's output will be utilized by Siri to show feedback to the user in form of a speakable text and certain UI.

Note: Siri limits memory and time available for Actions running in background. Therefore avoid long running and memory hungry tasks to let your Background and Siri Workflows to be successfully performed in Siri. Some suggestions:

  • Check your Workflows to ensure that they complete in less than a few seconds.
  • Avoid use and manipulation of full size images like ones taken by iPhone camera. 


For example,  you would be able to open Siri and say "save parking" to save parking time and location in Alloy. Then you can say "check parking" to get parking time left without leaving Siri. This can be easily done by adding a couple of Shortcuts for a "Save Parking" action: a foreground Shortcut bound to the "save parking" phrase and a background Shortcut bound to the "check parking" phrase. Please check the Using Siri Shortcuts with "Alloy - launcher and automator" video.


To add a Siri Shortcut for an Action to Siri:

  1. Show context menu for the Action  
  2. Choose the "Add | Add to Siri" option
  3. Specify a Siri Shortcut properties, if desired 
  4. Tap the Done button to show the "Add to Siri" view 
  5. Record a phrase to be associated with the Action 
  6. Tap the Done button to add the Action to Siri.


That is it! Now you can launch Siri and speak that recorded phrase to launch the Action.


Siri Shortcut Properties

The Siri Shortcut dialog allows to specify the following properties of a Siri Shortcut:

Name

Name for an Action to launch. You can specify your own name there if you want to make several Shortcuts for the same Action. It is feasible to specify different names for such Siri Shortcuts to allow distinguish them during Siri Shortcut maintenance.


Arguments

It is possible to add several Siri Shortcuts to the same Action. To do this - specify Siri Shortcut's Arguments in the "Siri Shortcut" dialog. By default, Action's Input Arguments ("Edit Action | Options | Arguments | Input Arguments") will be propagated to a Siri Shortcut but it is possible to freely change them. Those Arguments will be passed to the Action when it is launched from Siri and they will be available as usual Runtime Variables. So the Action can use those Arguments to adjust its behaviour according to the user preferences. 


Launch in Background

This option controls how an Action should launched - either in foreground or in background.

Note: only Actions offering Background or Siri Workflows can be launched in background.


Prompt to Launch

This option controls whether the user should be prompted before launching an Action

Note: this option is applicable for foreground shortcuts only.


Siri Workflow

When an Action is launched in background  - its Background Workflow will be performed by default. Though there is a special kind of Workflow - the Siri Workflow that will be performed instead, if specified. Having dedicated Siri Workflow allows to design different behavior for an Action when it is running in the Alloy app or in Siri.


"Siri Result" Task

The "Siri Result" task allows to specify result of an Action in the form suitable to Siri.

The following properties can be specified:

  1. Message: speakable message to be pronounced by Siri.
  2. Result: defines what to return to Siri. It can be either Glance, output of a Workflow or None. Returned data will be used by Siri to render result on screen. 


The following data can be rendered in Siri: 

  • Glance
  • Plain text
  • HTML text (having <html> tag at the start)
  • URL
  • Image
  • Location

Other types of data should be converted to a supported form to be properly presented.


Siri Shortcuts Maintenance

It is possible to maintain Siri Shortcuts, added by Alloy, via the "Settings | Siri & Search | Shortcuts" iOS view. 

There it is possible to change recorded phrases for some Shortcuts or delete them.