question

Yujin Yano avatar image
Yujin Yano asked

Custom task is not working.

tried with these code but didn't work.
Do custom tasks in Alexa Skills need certification before to use?


CountDown.1.json
{
"openapi": "3.0.0",
"info": {
"title": "A Custom Task to perform a count down",
"version": "1",
"x-amzn-alexa-access-scope": "public"
},
"tags": [
{
"name": "count down"
}
],
"paths": {
"/CountDown": {
"summary": "Count Down",
"description": "To start a count down",
...
skill.json
"manifest": {
    "apis": {
      "custom": {
        "tasks": [
        {
          "name": "CountDown",
          "version": "1"
        }
        ],
...
//index.js
...
"triggeringBehavior": {

                 operation: {

        type: 'LAUNCH_TASK',

        textToConfirm: [

          {

            locale: 'en-US',

            text: 'try another custom task?',

          },

        ],

        task: {

          //is providerSkillID and skillId one and the same?

          name: `${providerSkillID}.${providerTaskName}`,

          version: '1',

          input: {

            lowerLimit: 1,

            upperLimit: 10,

          },
...
alexa skillsask sdkcustom skill
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Whitworth avatar image
Andy Whitworth answered

Are you adding the task to an existing skill (one that is currently live) or a new skill ?


And how are you trying to test the task ?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yujin Yano avatar image
Yujin Yano answered

@Andy Whitworth
It's a new skill, not released, certified yet. and didn't test it yet.
Also tried the command in CLI to check if the task is recognized by the service.
alexacustomtask.png


1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Whitworth avatar image Andy Whitworth commented ·

I don't think get-task works on dev tasks. Try invoking the task using the smapi invoke-skill-end-point command

https://developer.amazon.com/en-US/docs/alexa/custom-skills/implement-custom-tasks-in-your-skill.html#to-invoke-your-task-handler

All that will really do though is invoke the LaunchHandler of your skill and pass in the required task payload. If you have a live version of the skill then you could test your task using Alexa routines but I don't believe this is possible with a skill that doesn't have a live version.

https://developer.amazon.com/en-US/docs/alexa/custom-skills/test-custom-task-with-alexa-routines.html

0 Likes 0 ·