Transaction API Issues Migrating from v2 to v3

google-assistant

#1

Hello,

I have been having a lot of trouble since migrating to Jovo v3, specifically only with Transactions for Google.

I’m able to get through to the Google Confirmation page, but whenever I say Yes to accepting the order, this.$googleAction.$transaction.isOrderAccepted() is always false.

I also looked at this.$googleAction.$transaction.getTransactionDecision(), and that was undefined.

Has anyone else had this issue and knows why Transactions are failing at these steps?

This is a Physical Goods transaction - in V2, we did not use any requirements check, or delivery address check, and we’ve been working fine. Are those mandatory for me to implement just to get transactions working?


#2

Hey!

Could you provide the request JSON?


#3

Yes of course! I have deleted just a few Session Attributes as they have PII or sensitive info, otherwise this is the full request after saying “Yes” to place my order.

I also notice it still shows V2 in the “type” instance, but I even just upgraded Jovo to 3.1 yesterday and I know for sure that is what I am running.

{
“responseId”: “8d0fa45e-ce31-4074-9857-778ed9418403-f1e7b32a”,
“queryResult”: {
“queryText”: “actions_intent_TRANSACTION_DECISION”,
“parameters”: {},
“allRequiredParamsPresent”: true,
“fulfillmentMessages”: [
{
“text”: {
“text”: [
“”
]
}
}
],
“outputContexts”: [
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_media_response_audio”
},
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_account_linking”
},
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_screen_output”
},
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_audio_output”
},
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/_jovo_session_zolia”,
“parameters”: {
“GAUser”: “463c47a9-1f06-404e-badf-e2625cdebd6d”,
“voicePlatform”: “Google”,
“userInformation”: {
= “customerName”: “John”,
“userName”: “STEVETEST11”,
“accountInformation”: {
“directPayEnrollmentStatus”: false,
“paperlessBilling”: true,
“contactPhoneNumber”: {
“profileTelephoneNumber”: {
“areaCode”: “631”,
“cityCode”: “974”,
“countryCode”: “1”,
“localNumber”: “3621”,
“telephoneUsage”: “contact”
}
}
},
“customerType”: “Residential”
},
“pinState”: {
“pinValidated”: false,
“changePaymentPIN”: false,
“hasBeenPromptedForPIN”: false,
“enabledPaymentPIN”: false,
“forgotPINlastSession”: false,
“resetPIN”: false,
“paymentPIN”: “”
},
“eventCategory”: “Pay Bill”,
“nextAction”: “”,
“paymentDollars”: 185,
“paymentCents”: 0,
“selectedPaymentAmount”: “185.00”,
“paymentSpeech”: “Great, you have successfully paid off your full balance.”,
“paymentOrder”: {
“id”: “STEVETEST111601584185”,
“cart”: {
“merchant”: {
“id”: “p_s_e_g_li”,
“name”: “PSEG Long Island”
},
“lineItems”: [
{
“name”: “Payment Amount”,
“id”: “pseg_li_payment”,
“price”: {
“amount”: {
“currencyCode”: “USD”,
“nanos”: 0,
“units”: “185”
},
“type”: “ACTUAL”
},
“quantity”: 1,
“subLines”: [],
“type”: “REGULAR”
}
],
“notes”: “This payment will be applied to the balance of $185 due on your account.”,
“otherItems”: []
},
“otherItems”: [
{
“name”: “Subtotal”,
“id”: “subtotal”,
“price”: {
“amount”: {
“currencyCode”: “USD”,
“nanos”: 0,
“units”: “185”
},
“type”: “ESTIMATE”
},
“type”: “SUBTOTAL”
},
{
“name”: “Tax”,
“id”: “tax”,
“price”: {
“amount”: {
“currencyCode”: “USD”,
“nanos”: 0,
“units”: 0
},
“type”: “ESTIMATE”
},
“type”: “TAX”
}
],
“totalPrice”: {
“amount”: {
“currencyCode”: “USD”,
“nanos”: 0,
“units”: “185”
},
“type”: “ESTIMATE”
}
}
}
},
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_intent_transaction_decision”,
“parameters”: {
“TRANSACTION_DECISION_VALUE”: {
@type”: “type.googleapis.com/google.actions.v2.TransactionDecisionValue”,
“userDecision”: “ORDER_ACCEPTED”,
“order”: {
“finalOrder”: {
“cart”: {
“merchant”: {
“id”: “p_s_e_g_li”,
“name”: “PSEG Long Island”
},
“notes”: “This payment will be applied to the balance of $185 due on your account.”,
“lineItems”: [
{
“name”: “Payment Amount”,
“type”: “REGULAR”,
“id”: “pseg_li_payment”,
“quantity”: 1,
“price”: {
“type”: “ACTUAL”,
“amount”: {
“currencyCode”: “USD”,
“units”: “185”
}
}
}
]
},
“otherItems”: [
{
“name”: “Subtotal”,
“type”: “SUBTOTAL”,
“id”: “subtotal”,
“price”: {
“type”: “ESTIMATE”,
“amount”: {
“currencyCode”: “USD”,
“units”: “185”
}
}
},
{
“name”: “Tax”,
“type”: “TAX”,
“id”: “tax”,
“price”: {
“type”: “ESTIMATE”,
“amount”: {
“currencyCode”: “USD”
}
}
}
],
“totalPrice”: {
“type”: “ESTIMATE”,
“amount”: {
“currencyCode”: “USD”,
“units”: “185”
}
},
“id”: “STEVETEST111601584185”
},
“googleOrderId”: “10230017607066609437”,
“orderDate”: “2020-10-01T20:29:50.870Z”,
“paymentInfo”: {
“displayName”: “Bank Account Ending in 6240”,
“paymentType”: “BANK”
}
},
“checkResult”: {
“resultType”: “OK”
}
},
“text”: “”
}
},
{
“name”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/system_counters”,
“parameters”: {
“no-input”: 0,
“no-match”: 0
}
}
],
“intent”: {
“name”: “projects/pseg-long-island/agent/intents/5c42a86e-abfb-4b1c-bee8-75b7840efa56”,
“displayName”: “ON_TRANSACTION”
},
“intentDetectionConfidence”: 1,
“languageCode”: “en”
},
“originalDetectIntentRequest”: {
“source”: “google”,
“version”: “2”,
“payload”: {
“user”: {
“accessToken”: “eyJ1c2VyX3R6IjoiQW1lcmljYVwvUGFuYW1hIiwic3ViIjoiU1RFVkVURVNUMTEiLCJ1c2VyX2xvY2FsZSI6ImVuIiwiaWRwX25hbWUiOiJsb2NhbElEUCIsInVzZXIudGVuYW50Lm5hbWUiOiJpZGNzLTliM2JjOTVjN2MyNzQ4ODJiY2Y2NGNhNzIzZjBhY2JiIiwiaWRwX2d1aWQiOiJsb2NhbElEUCIsImFtciI6WyJVU0VSTkFNRV9QQVNTV09SRCJdLCJpc3MiOiJodHRwczpcL1wvaWRlbnRpdHkub3JhY2xlY2xvdWQuY29tXC8iLCJ1c2VyX3RlbmFudG5hbWUiOiJpZGNzLTliM2JjOTVjN2MyNzQ4ODJiY2Y2NGNhNzIzZjBhY2JiIiwiY2xpZW50X2lkIjoiMzMzOGZlYzlmN2QyNGI5OWIyYTk4NzZiZGI3NTgyZjQiLCJzdWJfdHlwZSI6InVzZXIiLCJzY29wZSI6InVybjpvcGM6aWRtOnQuc2VjdXJpdHkuY2xpZW50IG9mZmxpbmVfYWNjZXNzIHVybjpvcGM6aWRtOnQub2F1dGhjb25zZW50cyB1cm46b3BjOmlkbTp0LnVzZXIubWUiLCJjbGllbnRfdGVuYW50bmFtZSI6ImlkY3MtOWIzYmM5NWM3YzI3NDg4MmJjZjY0Y2E3MjNmMGFjYmIiLCJ1c2VyX2xhbmciOiJlbiIsInVzZXJBcHBSb2xlcyI6WyJBdXRoZW50aWNhdGVkIl0sImV4cCI6MTYwMTU4Nzc2NCwia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PMhHeeD4N0VRI6PIXQeBwuBm4V46X446O2igNVNvUZY1lxveXLVdHYlKqekjmJRZQVWhKDEYJla1VkO1dSHFpQ-rxQ2q_BzexzqHbkcbhmvMITpW81qEN6U0Ku9lVaf6DxN-ZlRtjUnw7i9Nm_noNIZOih-u5h3kaUYj_YRsXh_UEVSKhxOwWPqxymBrMGmmh3Ztkd9T8ckvtJhjw2AW8kW_YLHLIOHxJK-9IJ0NOZPr04zYC_mu_y677E-KKyPg3IeH_ZiZPuLKQ7TZ59af1ntw71dVHC0rOnHk5ZhDp6jCmL3cXRdxbahvp_MesyrbZPkTXQG4Z13pw”,
“permissions”: [
“UPDATE”
],
“locale”: “en-US”,
“lastSeen”: “2020-10-01T20:29:45Z”,
“userStorage”: “{“userId”:“463c47a9-1f06-404e-badf-e2625cdebd6d”}”,
“userVerificationStatus”: “VERIFIED”
},
“conversation”: {
“conversationId”: “ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA”,
“type”: “ACTIVE”,
“conversationToken”: “[”_jovo_session_zolia"]"
},
“inputs”: [
{
“intent”: “actions.intent.TRANSACTION_DECISION”,
“rawInputs”: [
{}
],
“arguments”: [
{
“name”: “TRANSACTION_DECISION_VALUE”,
“extension”: {
@type”: “type.googleapis.com/google.actions.v2.TransactionDecisionValue”,
“userDecision”: “ORDER_ACCEPTED”,
“order”: {
“finalOrder”: {
“cart”: {
“merchant”: {
“id”: “p_s_e_g_li”,
“name”: “PSEG Long Island”
},
“notes”: “This payment will be applied to the balance of $185 due on your account.”,
“lineItems”: [
{
“name”: “Payment Amount”,
“type”: “REGULAR”,
“id”: “pseg_li_payment”,
“quantity”: 1,
“price”: {
“type”: “ACTUAL”,
“amount”: {
“currencyCode”: “USD”,
“units”: “185”
}
}
}
]
},
“otherItems”: [
{
“name”: “Subtotal”,
“type”: “SUBTOTAL”,
“id”: “subtotal”,
“price”: {
“type”: “ESTIMATE”,
“amount”: {
“currencyCode”: “USD”,
“units”: “185”
}
}
},
{
“name”: “Tax”,
“type”: “TAX”,
“id”: “tax”,
“price”: {
“type”: “ESTIMATE”,
“amount”: {
“currencyCode”: “USD”
}
}
}
],
“totalPrice”: {
“type”: “ESTIMATE”,
“amount”: {
“currencyCode”: “USD”,
“units”: “185”
}
},
“id”: “STEVETEST111601584185”
},
“googleOrderId”: “10230017607066609437”,
“orderDate”: “2020-10-01T20:29:50.870Z”,
“paymentInfo”: {
“displayName”: “Bank Account Ending in 6240”,
“paymentType”: “BANK”
}
},
“checkResult”: {
“resultType”: “OK”
}
}
},
{
“name”: “text”
}
]
}
],
“surface”: {
“capabilities”: [
{
“name”: “actions.capability.MEDIA_RESPONSE_AUDIO”
},
{
“name”: “actions.capability.ACCOUNT_LINKING”
},
{
“name”: “actions.capability.SCREEN_OUTPUT”
},
{
“name”: “actions.capability.AUDIO_OUTPUT”
}
]
},
“isInSandbox”: true,
“availableSurfaces”: [
{
“capabilities”: [
{
“name”: “actions.capability.AUDIO_OUTPUT”
},
{
“name”: “actions.capability.SCREEN_OUTPUT”
},
{
“name”: “actions.capability.WEB_BROWSER”
}
]
}
],
“requestType”: “SIMULATOR”
}
},
“session”: “projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA”
}


#4

Thank you. Could you please format the JSON. It’s a bit hard to read :slight_smile:


#5

Sorry! I hope this helps, thank you for the patience!

{
    "responseId": "8d0fa45e-ce31-4074-9857-778ed9418403-f1e7b32a",
    "queryResult": {
        "queryText": "actions_intent_TRANSACTION_DECISION",
        "parameters": {},
        "allRequiredParamsPresent": true,
        "fulfillmentMessages": [
            {
                "text": {
                    "text": [
                        ""
                    ]
                }
            }
        ],
        "outputContexts": [
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_media_response_audio"
            },
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_account_linking"
            },
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_screen_output"
            },
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_capability_audio_output"
            },
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/_jovo_session_zolia",
                "parameters": {
                    "GAUser": "463c47a9-1f06-404e-badf-e2625cdebd6d",
                    "voicePlatform": "Google",
                    "userInformation": {
=                        "customerName": "John",
                        "userName": "STEVETEST11",
                        "accountInformation": {
                            "directPayEnrollmentStatus": false,
                            "paperlessBilling": true,
                            "contactPhoneNumber": {
                                "profileTelephoneNumber": {
                                    "areaCode": "631",
                                    "cityCode": "974",
                                    "countryCode": "1",
                                    "localNumber": "3621",
                                    "telephoneUsage": "contact"
                                }
                            }
                        },
                        "customerType": "Residential"
                    },
                    "pinState": {
                        "pinValidated": false,
                        "changePaymentPIN": false,
                        "hasBeenPromptedForPIN": false,
                        "enabledPaymentPIN": false,
                        "forgotPINlastSession": false,
                        "resetPIN": false,
                        "paymentPIN": ""
                    },
                    "eventCategory": "Pay Bill",
                    "nextAction": "",
                    "paymentDollars": 185,
                    "paymentCents": 0,
                    "selectedPaymentAmount": "185.00",
                    "paymentSpeech": "Great, you have successfully paid off your full balance.",
                    "paymentOrder": {
                        "id": "STEVETEST111601584185",
                        "cart": {
                            "merchant": {
                                "id": "p_s_e_g_li",
                                "name": "PSEG Long Island"
                            },
                            "lineItems": [
                                {
                                    "name": "Payment Amount",
                                    "id": "pseg_li_payment",
                                    "price": {
                                        "amount": {
                                            "currencyCode": "USD",
                                            "nanos": 0,
                                            "units": "185"
                                        },
                                        "type": "ACTUAL"
                                    },
                                    "quantity": 1,
                                    "subLines": [],
                                    "type": "REGULAR"
                                }
                            ],
                            "notes": "This payment will be applied to the balance of $185 due on your account.",
                            "otherItems": []
                        },
                        "otherItems": [
                            {
                                "name": "Subtotal",
                                "id": "subtotal",
                                "price": {
                                    "amount": {
                                        "currencyCode": "USD",
                                        "nanos": 0,
                                        "units": "185"
                                    },
                                    "type": "ESTIMATE"
                                },
                                "type": "SUBTOTAL"
                            },
                            {
                                "name": "Tax",
                                "id": "tax",
                                "price": {
                                    "amount": {
                                        "currencyCode": "USD",
                                        "nanos": 0,
                                        "units": 0
                                    },
                                    "type": "ESTIMATE"
                                },
                                "type": "TAX"
                            }
                        ],
                        "totalPrice": {
                            "amount": {
                                "currencyCode": "USD",
                                "nanos": 0,
                                "units": "185"
                            },
                            "type": "ESTIMATE"
                        }
                    }
                }
            },
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/actions_intent_transaction_decision",
                "parameters": {
                    "TRANSACTION_DECISION_VALUE": {
                        "@type": "type.googleapis.com/google.actions.v2.TransactionDecisionValue",
                        "userDecision": "ORDER_ACCEPTED",
                        "order": {
                            "finalOrder": {
                                "cart": {
                                    "merchant": {
                                        "id": "p_s_e_g_li",
                                        "name": "PSEG Long Island"
                                    },
                                    "notes": "This payment will be applied to the balance of $185 due on your account.",
                                    "lineItems": [
                                        {
                                            "name": "Payment Amount",
                                            "type": "REGULAR",
                                            "id": "pseg_li_payment",
                                            "quantity": 1,
                                            "price": {
                                                "type": "ACTUAL",
                                                "amount": {
                                                    "currencyCode": "USD",
                                                    "units": "185"
                                                }
                                            }
                                        }
                                    ]
                                },
                                "otherItems": [
                                    {
                                        "name": "Subtotal",
                                        "type": "SUBTOTAL",
                                        "id": "subtotal",
                                        "price": {
                                            "type": "ESTIMATE",
                                            "amount": {
                                                "currencyCode": "USD",
                                                "units": "185"
                                            }
                                        }
                                    },
                                    {
                                        "name": "Tax",
                                        "type": "TAX",
                                        "id": "tax",
                                        "price": {
                                            "type": "ESTIMATE",
                                            "amount": {
                                                "currencyCode": "USD"
                                            }
                                        }
                                    }
                                ],
                                "totalPrice": {
                                    "type": "ESTIMATE",
                                    "amount": {
                                        "currencyCode": "USD",
                                        "units": "185"
                                    }
                                },
                                "id": "STEVETEST111601584185"
                            },
                            "googleOrderId": "10230017607066609437",
                            "orderDate": "2020-10-01T20:29:50.870Z",
                            "paymentInfo": {
                                "displayName": "Bank Account Ending in 6240",
                                "paymentType": "BANK"
                            }
                        },
                        "checkResult": {
                            "resultType": "OK"
                        }
                    },
                    "text": ""
                }
            },
            {
                "name": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA/contexts/__system_counters__",
                "parameters": {
                    "no-input": 0,
                    "no-match": 0
                }
            }
        ],
        "intent": {
            "name": "projects/pseg-long-island/agent/intents/5c42a86e-abfb-4b1c-bee8-75b7840efa56",
            "displayName": "ON_TRANSACTION"
        },
        "intentDetectionConfidence": 1,
        "languageCode": "en"
    },
    "originalDetectIntentRequest": {
        "source": "google",
        "version": "2",
        "payload": {
            "user": {
                "accessToken": "eyJ1c2VyX3R6IjoiQW1lcmljYVwvUGFuYW1hIiwic3ViIjoiU1RFVkVURVNUMTEiLCJ1c2VyX2xvY2FsZSI6ImVu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UPDATE"
                ],
                "locale": "en-US",
                "lastSeen": "2020-10-01T20:29:45Z",
                "userStorage": "{\"userId\":\"463c47a9-1f06-404e-badf-e2625cdebd6d\"}",
                "userVerificationStatus": "VERIFIED"
            },
            "conversation": {
                "conversationId": "ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA",
                "type": "ACTIVE",
                "conversationToken": "[\"_jovo_session_zolia\"]"
            },
            "inputs": [
                {
                    "intent": "actions.intent.TRANSACTION_DECISION",
                    "rawInputs": [
                        {}
                    ],
                    "arguments": [
                        {
                            "name": "TRANSACTION_DECISION_VALUE",
                            "extension": {
                                "@type": "type.googleapis.com/google.actions.v2.TransactionDecisionValue",
                                "userDecision": "ORDER_ACCEPTED",
                                "order": {
                                    "finalOrder": {
                                        "cart": {
                                            "merchant": {
                                                "id": "p_s_e_g_li",
                                                "name": "PSEG Long Island"
                                            },
                                            "notes": "This payment will be applied to the balance of $185 due on your account.",
                                            "lineItems": [
                                                {
                                                    "name": "Payment Amount",
                                                    "type": "REGULAR",
                                                    "id": "pseg_li_payment",
                                                    "quantity": 1,
                                                    "price": {
                                                        "type": "ACTUAL",
                                                        "amount": {
                                                            "currencyCode": "USD",
                                                            "units": "185"
                                                        }
                                                    }
                                                }
                                            ]
                                        },
                                        "otherItems": [
                                            {
                                                "name": "Subtotal",
                                                "type": "SUBTOTAL",
                                                "id": "subtotal",
                                                "price": {
                                                    "type": "ESTIMATE",
                                                    "amount": {
                                                        "currencyCode": "USD",
                                                        "units": "185"
                                                    }
                                                }
                                            },
                                            {
                                                "name": "Tax",
                                                "type": "TAX",
                                                "id": "tax",
                                                "price": {
                                                    "type": "ESTIMATE",
                                                    "amount": {
                                                        "currencyCode": "USD"
                                                    }
                                                }
                                            }
                                        ],
                                        "totalPrice": {
                                            "type": "ESTIMATE",
                                            "amount": {
                                                "currencyCode": "USD",
                                                "units": "185"
                                            }
                                        },
                                        "id": "STEVETEST111601584185"
                                    },
                                    "googleOrderId": "10230017607066609437",
                                    "orderDate": "2020-10-01T20:29:50.870Z",
                                    "paymentInfo": {
                                        "displayName": "Bank Account Ending in 6240",
                                        "paymentType": "BANK"
                                    }
                                },
                                "checkResult": {
                                    "resultType": "OK"
                                }
                            }
                        },
                        {
                            "name": "text"
                        }
                    ]
                }
            ],
            "surface": {
                "capabilities": [
                    {
                        "name": "actions.capability.MEDIA_RESPONSE_AUDIO"
                    },
                    {
                        "name": "actions.capability.ACCOUNT_LINKING"
                    },
                    {
                        "name": "actions.capability.SCREEN_OUTPUT"
                    },
                    {
                        "name": "actions.capability.AUDIO_OUTPUT"
                    }
                ]
            },
            "isInSandbox": true,
            "availableSurfaces": [
                {
                    "capabilities": [
                        {
                            "name": "actions.capability.AUDIO_OUTPUT"
                        },
                        {
                            "name": "actions.capability.SCREEN_OUTPUT"
                        },
                        {
                            "name": "actions.capability.WEB_BROWSER"
                        }
                    ]
                }
            ],
            "requestType": "SIMULATOR"
        }
    },
    "session": "projects/pseg-long-island/agent/sessions/ABwppHFzSIMSNCJ8A2aFKRrRBmESa8TgkslqdMWege_L1CmXpZX0O8THaY5vvFflFQ7Xgf8bes73HH0lXoPxAA"
}

#6

I think I may have found the issue here:

I’m not sure why, but you can see in the @type argument that it’s calling google.actions.v2. Then when I look in the jovo-core dist/src folder, I noticed that the getTransactionDecisionResult() function was looking for an attribute “extension.transactionDecision”.

When you look at the request I posted above, you can clearly see in the arguments array, “extension.userDecision”. I think this was the cause of my issue.

For a temporary work around, I’ve just overwritten the getTransactionDecisionResult() method in my own helperFunctions class, and am using that to access the userDecision value from the request.


#7

Yes, that was the issue. Fixed it an hour ago and it took me one hour to publish the package. Slow PC, Git issues, Lerna issues. :smiley:

Please run jovo update in your project folder.


#8

I now get this error just trying to open the Action:

"Error: Cannot find module './dist/cjs/i18next.js'\nRequire stack:\n- /opt/nodejs/node_modules/i18next/index.js\n- /opt/nodejs/node_modules/jovo-core/dist/src/plugins/I18Next.js\n- /opt/nodejs/node_modules/jovo-core/dist/src/plugins/ComponentPlugin.js\n- /opt/nodejs/node_modules/jovo-core/dist/src/core/BaseApp.js\n- /opt/nodejs/node_modules/jovo-core/dist/src/index.js\n- /opt/nodejs/node_modules/jovo-framework/dist/src/index.js\n- /var/task/index.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js"


#9

Let me apologize - not sure what was wrong in my Cloud Environment but things are working as expected now!!

Thank you so much Alex for your help here, this was such a cool experience and I’m really glad that you were to help.


#10

@AlexSwe, @jan

Hello Alex,

It’s been about a year since I first mentioned this issue, and unfortunately an extremely similar issue is happening again

When we trigger the googleOrderScreen() function, which will display the Google Order page on our phone, we are immediately given an error. Looking in GCP logs, we can see this message:

"MalformedResponse at expected_inputs[0].possible_intents[0].input_value_data.transaction_decision_value_spec: Transactions/Orders v2 API has been turned down. Follow the instructions https://developers.google.com/assistant/transactions/reference/physical/migrationv1v2/physical_migration_v3 to migrate to v3. For more support, please visit https://developers.google.com/assistant/support."

When we look at Transaction.js in the jovo-core-googleassistant directory, I can see in the implementation of TransactionDescision, it is using GoogleAPIs V2:

if (_get(output, 'GoogleAssistant.TransactionDecision')) {
            _set(googleAction.$originalResponse, 'expectUserResponse', true);
            _set(googleAction.$originalResponse, 'systemIntent', {
                intent: 'actions.intent.TRANSACTION_DECISION',
                data: {
                    '@type': 'type.googleapis.com/google.actions.v2.TransactionDecisionValueSpec',
                    'orderOptions': {
                        requestDeliveryAddress: true,
                    },
                    'paymentOptions': _get(output, 'GoogleAssistant.TransactionDecision.paymentOptions'),
                    'proposedOrder': _get(output, 'GoogleAssistant.TransactionDecision.proposedOrder'),
                },
            })
        }

Below is the full JSON request we are sending:

{
  "conversationToken": "[\"__system_counters__\",\"_jovo_session_iacxn\"]",
  "expectUserResponse": true,
  "expectedInputs": [{
    "inputPrompt": {
    },
    "possibleIntents": [{
      "intent": "actions.intent.TRANSACTION_DECISION",
      "inputValueData": {
        "@type": "type.googleapis.com/google.actions.v2.TransactionDecisionValueSpec",
        "proposedOrder": {
          "cart": {
            "merchant": {
              "id": "p_s_e_g",
              "name": "PSE\u0026G"
            },
            "notes": "Please note, this appliance is not covered by a WorryFree contract. Our regular service charges for parts and labor will apply if you choose to have us service the equipment",
            "lineItems": [{
              "name": "SERVICE APPOINTMENT: GAS WATER HEATER",
              "type": "REGULAR",
              "id": "pseg_payment",
              "quantity": 1,
              "price": {
                "type": "ACTUAL",
                "amount": {
                  "currencyCode": "USD"
                }
              }
            }]
          },
          "otherItems": [{
            "name": "Subtotal",
            "type": "SUBTOTAL",
            "id": "subtotal",
            "price": {
              "type": "ESTIMATE",
              "amount": {
                "currencyCode": "USD"
              }
            }
          }, {
            "name": "Tax",
            "type": "TAX",
            "id": "tax",
            "price": {
              "type": "ESTIMATE",
              "amount": {
                "currencyCode": "USD"
              }
            }
          }],
          "totalPrice": {
            "type": "ESTIMATE",
            "amount": {
              "currencyCode": "USD"
            }
          },
          "id": "kevin10701634584105"
        },
        "orderOptions": {
          "requestDeliveryAddress": true
        },
        "paymentOptions": {
          "actionProvidedOptions": {
            "displayName": "The charges will be included in your next bill.",
            "paymentType": "BANK"
          }
        }
      }
    }],
    "speechBiasingHints": ["$ApplianceIssue", "$sys.number-integer", "$TimeOfDay", "$sys.number", "$ApplianceGroup", "$outageType", "$FuelType", "$Appliance", "$DayBefore", "$SecondaryAddress", "$sys.number-sequence", "$Alphabet", "$Options"]
  }],
  "responseMetadata": {
    "status": {
      "message": "Success (200)"
    },
    "queryMatchInfo": {
      "queryMatched": true,
      "intent": "ea852ee4-1ecc-41ef-a699-481aeb96dc34"
    },
    "delegatedRequest": {...}
}

We have tried to update to the latest Jovo version however this has not resolved our issues. Please let us know how we can resolve this as our Live application is now broken due to this issue. If we need to provide any more information please let us know.

Thanks,

Sal


#11

Hey @Sal_Orsino

Where’s the googleOrderScreen() function from? Could you provide the full flow until the error occurs?


#12

I don’t have a running transactions environment here, could you try something for me?

Looks like the payload of the TransactionDecision object in v3 is the same, only the @type value is different. Here’s a hook (untested) which replaces the old @type value with the one in v3.

app.hook('response', (error, handleRequest, jovo) => {
  if (jovo.$response.systemIntent.data['@type'] === 'type.googleapis.com/google.actions.v2.TransactionDecisionValueSpec') {
    jovo.$response.systemIntent.data['@type'] = 'type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec';
  }

})

#13

Hi @AlexSwe,

My mistake, that’s a custom function we have created. That function is trying to invoke
this.$googleAction.$transaction.transactionDecision(), and that’s where we are getting the error.

Here is the error message we see in the GCP logs:

{
  "textPayload": "MalformedResponse at expected_inputs[0].possible_intents[0].input_value_data.transaction_decision_value_spec: Transactions/Orders v2 API has been turned down. Follow the instructions https://developers.google.com/assistant/transactions/reference/physical/migrationv1v2/physical_migration_v3 to migrate to v3. For more support, please visit https://developers.google.com/assistant/support.",
  "insertId": "14sh6rlfjwa7wr",
  "resource": {
    "type": "assistant_action",
    "labels": {
      "project_id": "pseg-qa",
      "action_id": "actions.intent.TEXT",
      "version_id": ""
    }
  },
  "timestamp": "2021-10-22T14:50:44.589140096Z",
  "severity": "ERROR",
  "labels": {
    "querystream": "GOOGLE_USER",
    "source": "JSON_RESPONSE_VALIDATION",
    "channel": "preview"
  },
  "logName": "projects/pseg-qa/logs/actions.googleapis.com%2Factions",
  "trace": "projects/765660765891/traces/ABwppHHVb8-YpjMl1c9v8m9ZPydzcytMJIhBdkfPpgJD5eSDmesvkcgfLxT9nY90JgEqHX9pLw",
  "receiveTimestamp": "2021-10-22T14:50:44.597172633Z"
}

Here is the request:

{
  "textPayload": "Sending request with post data: {\"user\":{\"accessToken\":\"e ... ",\"permissions\":[\"UPDATE\"],\"locale\":\"en-US\",\"userStorage\":\"{\\\"userId\\\":\\\"199f3c92-2fcc-4a92-b89c-2af49f82135c\\\"}\",\"userVerificationStatus\":\"VERIFIED\"},\"conversation\":{\"conversationId\":\"ABwppHHVb8-YpjMl1c9v8m9ZPydzcytMJIhBdkfPpgJD5eSDmesvkcgfLxT9nY90JgEqHX9pLw\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"_jovo_session_zyruk\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"yes\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"yes\",\"textValue\":\"yes\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}.",
  "insertId": "1hkbubdfjh3nck",
  "resource": {
    "type": "assistant_action",
    "labels": {
      "version_id": "",
      "action_id": "actions.intent.TEXT",
      "project_id": "pseg-qa"
    }
  },
  "timestamp": "2021-10-22T14:50:43.990999368Z",
  "severity": "DEBUG",
  "labels": {
    "querystream": "GOOGLE_USER",
    "channel": "preview",
    "source": "AOG_REQUEST_RESPONSE"
  },
  "logName": "projects/pseg-qa/logs/actions.googleapis.com%2Factions",
  "trace": "projects/765660765891/traces/ABwppHHVb8-YpjMl1c9v8m9ZPydzcytMJIhBdkfPpgJD5eSDmesvkcgfLxT9nY90JgEqHX9pLw",
  "receiveTimestamp": "2021-10-22T14:50:44.600464769Z"
}

and here is the payment info we are sending to transactionDecision, and all we really hear from Google is “Sorry, PSEG QA is not responding right now. Please try again later.”

 "transaction": {
                    "cents": 0,
                    "dollars": 163,
                    "item": "SERVICE APPOINTMENT: REFRIGERATOR",
                    "notes": "Please note your electric appliance is not covered by a WorryFree contract. There will be a service charge of $ 163, plus tax, in addition to our regular charges for any other parts and labor required.",
                    "displayName": "The charges will be included in your next bill."
                },
                "order": {
                    "id": "Gasonly11634913852",
                    "cart": {
                        "merchant": {
                            "id": "p_s_e_g",
                            "name": "PSE&G"
                        },
                        "lineItems": [
                            {
                                "name": "SERVICE APPOINTMENT: REFRIGERATOR",
                                "id": "pseg_payment",
                                "price": {
                                    "amount": {
                                        "currencyCode": "USD",
                                        "nanos": 0,
                                        "units": "163"
                                    },
                                    "type": "ACTUAL"
                                },
                                "quantity": 1,
                                "subLines": [],
                                "type": "REGULAR"
                            }
                        ],
                        "notes": "Please note your electric appliance is not covered by a WorryFree contract. There will be a service charge of $ 163, plus tax, in addition to our regular charges for any other parts and labor required.",
                        "otherItems": []
                    },
                    "otherItems": [
                        {
                            "name": "Subtotal",
                            "id": "subtotal",
                            "price": {
                                "amount": {
                                    "currencyCode": "USD",
                                    "nanos": 0,
                                    "units": "163"
                                },
                                "type": "ESTIMATE"
                            },
                            "type": "SUBTOTAL"
                        },
                        {
                            "name": "Tax",
                            "id": "tax",
                            "price": {
                                "amount": {
                                    "currencyCode": "USD",
                                    "nanos": 0,
                                    "units": 0
                                },
                                "type": "ESTIMATE"
                            },
                            "type": "TAX"
                        }
                    ],
                    "totalPrice": {
                        "amount": {
                            "currencyCode": "USD",
                            "nanos": 0,
                            "units": "163"
                        },
                        "type": "ESTIMATE"
                    }
                }
            }
        }
    ],
    "payload": {
        "google": {
            "expectUserResponse": true,
            "systemIntent": {
                "intent": "actions.intent.TRANSACTION_DECISION",
                "data": {
                    "@type": "type.googleapis.com/google.actions.v2.TransactionDecisionValueSpec",
                    "orderOptions": {
                        "requestDeliveryAddress": true
                    },
                    "paymentOptions": {
                        "actionProvidedOptions": {
                            "paymentType": "BANK",
                            "displayName": "The charges will be included in your next bill."
                        }
                    },
                    "proposedOrder": {
                        "id": "Gasonly11634913852",
                        "cart": {
                            "merchant": {
                                "id": "p_s_e_g",
                                "name": "PSE&G"
                            },
                            "lineItems": [
                                {
                                    "name": "SERVICE APPOINTMENT: REFRIGERATOR",
                                    "id": "pseg_payment",
                                    "price": {
                                        "amount": {
                                            "currencyCode": "USD",
                                            "nanos": 0,
                                            "units": "163"
                                        },
                                        "type": "ACTUAL"
                                    },
                                    "quantity": 1,
                                    "subLines": [],
                                    "type": "REGULAR"
                                }
                            ],
                            "notes": "Please note your electric appliance is not covered by a WorryFree contract. There will be a service charge of $ 163, plus tax, in addition to our regular charges for any other parts and labor required.",
                            "otherItems": []
                        },
                        "otherItems": [
                            {
                                "name": "Subtotal",
                                "id": "subtotal",
                                "price": {
                                    "amount": {
                                        "currencyCode": "USD",
                                        "nanos": 0,
                                        "units": "163"
                                    },
                                    "type": "ESTIMATE"
                                },
                                "type": "SUBTOTAL"
                            },
                            {
                                "name": "Tax",
                                "id": "tax",
                                "price": {
                                    "amount": {
                                        "currencyCode": "USD",
                                        "nanos": 0,
                                        "units": 0
                                    },
                                    "type": "ESTIMATE"
                                },
                                "type": "TAX"
                            }
                        ],
                        "totalPrice": {
                            "amount": {
                                "currencyCode": "USD",
                                "nanos": 0,
                                "units": "163"
                            },
                            "type": "ESTIMATE"
                        }
                    }
                }
            },
            "userStorage": "{\"userId\":\"199f3c92-2fcc-4a92-b89c-2af49f82135c\"}"
        }
    }
}

We are using the most current version of Jovo, 3.5.1 as well. Please let us know if there’s anything else we can share to help resolve this.

Thanks,

Sal


#14

Thanks.

Have you tried the suggestion from above?

app.hook('response', (error, handleRequest, jovo) => {
  if (jovo.$response.systemIntent.data['@type'] === 'type.googleapis.com/google.actions.v2.TransactionDecisionValueSpec') {
    jovo.$response.systemIntent.data['@type'] = 'type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec';
  }

})

#15

Hi Alex,

I hadn’t actually seen that response I apologize - I will test this out now and get back to you with results


#16

Hi @AlexSwe,

I put this code right into my app.js file, right above where I put my app.use() handler, and it’s not working, our app won’t even open when I put this handler in.

The error I get is that it can’t find property “data” of undefined, and below what I get when I console.log(jovo.$response)

DialogflowResponse {
  fulfillmentText: '<prosody rate="105%" pitch="+2.5st">Thank you FAIYAZ. According to our records, it is necessary to change your gas meter. Would you like to schedule your appointment now?</prosody>',
  end_interaction: false,
  outputContexts: [
    {
      name: 'projects/pseg-nj-sal-qa/agent/environments/__aog-5/users/-/sessions/ABwppHHr44RYYZ_m6Ch3Q0frJcNgJ6-sdlD_Lh2oAG_aY5jJ4eAUsqJlL0fXXgXj00HfgF-TaxrnySt5EzU/contexts/_jovo_session_tftjf',
      lifespanCount: 1,
      parameters: [Object]
    }
  ]
}

To get around that, I just put a check like such:

if (jovo.$response.systemIntent && (jovo.$response.systemIntent.data['@type'] === 'type.googleapis.com/google.actions.v2.TransactionDecisionValueSpec'))

However still this never gets executed - once I say “Yes” to scheduling my appointment, which then invokes getTransactionDecision, this is what I see when I log jovo.$response:

DialogflowResponse {
  outputContexts: [
    {
      name: 'projects/pseg-nj-sal-qa/agent/environments/__aog-5/users/-/sessions/ABwppHEGki87hvvhyo-HOZBijbUXKPOZPijFnQplEjddgMSVVas75kfn4Lyse-aWQGo5oi8onSDOUF2nM5s/contexts/_jovo_session_peycs',
      lifespanCount: 1,
      parameters: [Object]
    }
  ]

}


#17

@AlexSwe

I believe I was supposed to be accessing from jovo.$originalRequest.systemIntent, that seemed to have been the issue for that first error.

Once I made that update, I am getting a new error like such:

“MalformedResponse: Failed to parse Dialogflow response into AppResponse because of invalid platform response: Tried to parse data from system intent but failed”

Here is the output from the textPayload attribute:

{
  "@type": "type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec",
  "orderOptions": {
    "requestDeliveryAddress": true
  },
  "paymentOptions": {
    "actionProvidedOptions": {
      "paymentType": "BANK",
      "displayName": "The charges will be included in your next bill."
    }
  },
  "proposedOrder": {
    "id": "kevin10701635261106",
    "cart": {
      "merchant": {
        "id": "p_s_e_g",
        "name": "PSE\u0026G"
      },
      "lineItems": [{
        "name": "SERVICE APPOINTMENT: GAS METER",
        "id": "pseg_payment",
        "price": {
          "amount": {
            "currencyCode": "USD",
            "nanos": 0.0,
            "units": "0"
          },
          "type": "ACTUAL"
        },
        "quantity": 1.0,
        "subLines": [],
        "type": "REGULAR"
      }],
      "notes": "Please note, this appliance is not covered by a WorryFree contract. Our regular service charges for parts and labor will apply if you choose to have us service the equipment",
      "otherItems": []
    },
    "otherItems": [{
      "name": "Subtotal",
      "id": "subtotal",
      "price": {
        "amount": {
          "currencyCode": "USD",
          "nanos": 0.0,
          "units": "0"
        },
        "type": "ESTIMATE"
      },
      "type": "SUBTOTAL"
    }, {
      "name": "Tax",
      "id": "tax",
      "price": {
        "amount": {
          "currencyCode": "USD",
          "nanos": 0.0,
          "units": 0.0
        },
        "type": "ESTIMATE"
      },
      "type": "TAX"
    }],
    "totalPrice": {
      "amount": {
        "currencyCode": "USD",
        "nanos": 0.0,
        "units": "0"
      },
      "type": "ESTIMATE"
    }
  }
}

#18

There are differences in the object after all.

Could you try to build a custom payload in the hook?

paymentOptions is paymentParameters with other properties now. orderOptions seems to be the same, proposedOrder is order now.

Here’s the reference: https://developers.google.com/assistant/transactions/reference/physical/rest/v3/TransactionDecisionValueSpec


#19

@AlexSwe

I am making all the necessary updates, however when I log the response from Jovo, it’s still using these old V2 values:

{
  "@type": "type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec",
  "orderOptions": {
    "requestDeliveryAddress": true
  },
  "paymentOptions": {
    "merchantPaymentOption": {
      "merchantPaymentMethod": [{
        "paymentMethodID": "kevin10701635348567",
        "paymentMethodDisplayInfo": {
          "paymentType": "BANK",
          "paymentMethodDisplayName": "The charges will be included in your next bill."
        }
      }]
    }
  },
  "proposedOrder": {
    "createTime": "2021-10-27T15:29:27.133Z",
    "merchantOrderID": "kevin10701635348567",
    "transactionMerchant": {
      "id": "p_s_e_g",
      "name": "PSE\u0026G"
    },
    "contents": {
      "lineItems": [{
        "name": "SERVICE APPOINTMENT: GAS METER",
        "id": "pseg_payment",
        "description": "PSE\u0026G Payment",
        "priceAttributes": [{
          "type": "TOTAL",
          "name": "PSEG Payment",
          "state": "Actual",
          "amount": {
            "currencyCode": "USD",
            "amountInMicros": 0.0
          }
        }],
        "notes": ["Please note, this appliance is not covered by a WorryFree contract. Our regular service charges for parts and labor will apply if you choose to have us service the equipment"],
        "purchase": {
          "quantity": 1.0
        }
      }]
    },
    "buyerInfo": {
      "email": "[email protected]",
      "firstName": "Sal",
      "lastName": "Orsino",
      "displayName": "Sal Orsino"
    },
    "priceAttributes": [{
      "type": "TOTAL",
      "name": "Total Price",
      "state": "ACTUAL",
      "amount": {
        "currencyCode": "USD",
        "amountInMicros": 0.0
      }
    }],
    "purchase": {
      "status": "CREATED",
      "userVisibleStatusLabel": "CREATED",
      "price": {
        "type": "REGULAR",
        "name": "Delivery Price",
        "state": "ACTUAL",
        "amount": {
          "currencyCode": "USD",
          "amountInMicros": 2000000.0
        }
      }
    }
  }
}

Do I have to overwrite this as well?


#20

You could delete the v2 properties from the response object.

delete jovo.$originalRequest.systemIntent.data.xxxxxx