2

How can I add a system intent to the scene in the Action Builder?

E.g. I want to add one of the media intents: actions.intent.MEDIA_STATUS_STOPPED, actions.intent.MEDIA_STATUS_PAUSED,...

When you try to add one of these to the scene, you will get the error:

Name can only contain letters, numbers, and underscores. The name also must start with a letter.

If you try to add it without the "actions.intent." part, e.g. MEDIA_STATUS_STOPPED it will be treated as a user's custom intent. And because of it, it won't handle any callback for the Media object state changes.

The documentation is silent about it.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
P.Filippov
  • 121
  • 9

1 Answers1

3

It sounds like you're trying to add these Intents under the "User intent handling" section of the Scene. But these aren't user intents - these are system intents that have been pre-defined. So instead you add them in the "Error and status handling" section.

Error and status handling section

When you do, the pane on the right will let you select a System Intent to setup processing for.

System Intent pane

You can then select the System Intent from the drop-down menu, including MEDIA_STATUS_STOPPED, etc.

System Intent drop down menu

Once you have, you can then setup how you want to handle that System Intent (calling a webhook, sending prompts, and/or transitioning to another scene).

Intent handling

You can then repeat this, as necessary, for any other media status system intents.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • Thank you for that! I solved it differently, using gactions CLI and editing the scene's yaml: `- handler: webhookHandler: mediaStatusHandler intent: actions.intent.MEDIA_STATUS_FINISHED - handler: webhookHandler: mediaStatusHandler intent: actions.intent.MEDIA_STATUS_PAUSED - handler: webhookHandler: mediaStatusHandler intent: actions.intent.MEDIA_STATUS_STOPPED - handler: webhookHandler: mediaStatusHandler intent: actions.intent.MEDIA_STATUS_FAILED` It required me much more efforts to do the same thing :-) – P.Filippov Oct 24 '20 at 07:31
  • 1
    If an answer has helped - accepting and/or upvoting it is always appreciated. If you have another solution, posting it as a separate answer (and accepting that answer) is encouraged. – Prisoner Oct 25 '20 at 17:18