Transaction Shortcuts + AppIntent is flaky occasionally

Hello, I made myself an app to track my expenses. The most important event is when I make a purchase via apple wallet.

What happens is sometimes the values from Merchant and Amount are; Merchant = " " Amount = 0.0

Has anyone experienced this, is there something I can do about it ? I was thinking that sometimes maybe speed connection and service is something that might make an impact

Does anyone here know something about the topic ?

I take it these are the variables set by the system from the Personal Automations feature of Shortcuts? If so, you should ask about those over in the Apple Support Community, since those values are part of the Shortcuts customer-facing features, rather than something specific you configure in your app via an API.

Will check the link you provided, but to provide a little more info

This is the code


struct LogTransactionIntent: AppIntent {
    static var title: LocalizedStringResource = "Log Transaction"

    @Parameter(title: "Merchant")
    var merchant: String

    @Parameter(title: "Amount")
    var amount: Double

And in the picture is how I pass the values

Let's take your intent out of the picture for a moment — if you configure the automation to perform some other built-in action, do you also find that the merchant name is empty or the amount is 0?

— Ed Ford,  DTS Engineer

I made a shortcut which sends a message via iMessages. Monitoring its behaviour.

Let's say it doesn't behave as it does with my Intent and the merchant variable is always passed successfully, meaning the issue is not reproducible this way.

What would be the reason for my Intent to behave differently if the code from above is as simple as it gets ?

Transaction Shortcuts + AppIntent is flaky occasionally
 
 
Q