Custom Intent Resolve Methods Not Called in Correct Order

According to the WWDC19 video (Introducing Parameters for Shortcuts), the parameters are supposed to be resolved in the order you have placed them in the Intents Definition file in Xcode (see timestamp 13:02 through 13:16).

In my objective C implementation, this is not happening. I deleted the derivedData and clean the build file, but that did not help. Here is a screenshot of my intents definition parameters:

In my implementation, it seems to first process the parameters that do not have "Dynamic Options" check. Then it circles back and works on the ones that have "Dynamic Options". So in my case, it starts with partName, quantity, dimensions, thickness, width, and length. Then it works on partsListName.

Furthermore, while the "Disambiguation Prompt" is spoken/written, the "Disambiguation Introduction" is NOT spoken/written.

Is this a bug that is causing the parameters to be resolved in the wrong order, or do I need to do something differently to force it to resolve parameters in the order that I need it to go in? And are the "Disambiguation Introduction" supposed to work?

Answered by jeffb6688 in 714733022

Ok, the problem with the parameters not being resolved in the correct order is due to the fact that I moved a couple parameters from being last in the list to being first in the list (as I mentioned in my comment above). The source of the problem is that these two parameters had disambiguous prompts that referenced other parameters. Once they were moved, the reference to the other parameters now became prompts to parameters that had not been resolved yet. So, once I cleaned that up, all is well.

I still do not understand how or when the Disambiguation Introduction or the Subsequent Introduction are spoken by Siri. Can't seem to find this in the documentation.

I should also mention that the order of the parameters shown above is not the initial order of the parameters that existed when I first created the intents definition file. In fact, I am pretty sure that the partsListName and the woodSpecies may have been the last parameters in the list. I later moved them to the front. That is one reason that I deleted the derivedData and cleaned the build file thinking that that might clear whatever data/mechanism that determines the order of parameter resolution. But as I said, that did not help either. So if anyone can give me a suggestion on how to get this working as advertised, I would really appreciate it.

Accepted Answer

Ok, the problem with the parameters not being resolved in the correct order is due to the fact that I moved a couple parameters from being last in the list to being first in the list (as I mentioned in my comment above). The source of the problem is that these two parameters had disambiguous prompts that referenced other parameters. Once they were moved, the reference to the other parameters now became prompts to parameters that had not been resolved yet. So, once I cleaned that up, all is well.

I still do not understand how or when the Disambiguation Introduction or the Subsequent Introduction are spoken by Siri. Can't seem to find this in the documentation.

I find development of intents in conjunction with the shortcut app incredibly frustrating. It seems that the support for intents is very fragile. While I had success a year ago, I've since tried to make improvements only to be stymied with similar problems. After a couple weeks of struggles trying to add parameters to my intent, I found that when you add parameters, you have to delete the derived data, clean the build folder, and delete the shortcut app. I have no idea why the shortcut app has to be deleted since the parameter I added is not a parameter that is modifiable by the shortcut app. Nonetheless, it was required.

That procedure worked for me for a while. Then I added another parameter and its broken again. Even after deleting the derived data and cleaning the build folder and deleting the shortcut app, the system make no attempt to resolve the new parameter. Furthermore, the system does not attempt to resolved the parameters in the order that they appear in the parameter list of the intents definition interface. I can only assume that there is some other trick that must be done to make the system want to resolve every parameter and in the order that they appear. So, if there is anyone out there that has experienced this and learned what the solution it, I would be so grateful for an explanation.

Custom Intent Resolve Methods Not Called in Correct Order
 
 
Q