"version":"300" Flow
2

When I send a "data_exchange" in my Flow, I can correctly navigate through the pages. However, when selecting a value from my Dropdown, I process the response, send it back to the flow, and it returns this request to me with missing information and the wrong version.

Request: {"version":"300","action":"data_exchange","screen":"CRIAR_SOLICITACAO_TIPO_TRANSPORTE_PAGE","data":{"telefone":"31991884649"},"flowToken":"54947df8-0e9e-4471-a2f9-9af509fb5889"}

Below is the sequence of my flow and what it does after I choose a dropdown:

1° After choosing the option, it sends this request to my webhook Request: {"version":"3.0","action":"data_exchange","screen":"CRIAR_SOLICITACAO_TIPO_TRANSPORTE_PAGE","data":{"nomePassageiro":"Sem Passageiro","qtdVagas":"0","nomeSolicitante":"Filipe","telefone":"31900000000","tipoTransporte":"111","dataProgramada":"1719370800000","hora":"5","minuto":"7"},"flowToken":"myFlowToken"}

2° This is the response I send back to it, containing the new page it will go to Response: {"version":"3.0","screen":"CRIAR_SOLICITACAO_ESCOLHER_ESCREVER_ORIGEM_PAGE","data":{"nomePassageiro":"Sem Passageiro","qtdVagas":"0","nomeSolicitante":"Filipe","telefone":"31900000000","tipoTransporte":"109","dataProgramada":"1719370800000","hora":"20","minuto":"10","observacao":" "}}

3° I receive this request again, as if it were sent again but with some issues, such as the version number and missing data Request: {"version":"300","action":"data_exchange","screen":"CRIAR_SOLICITACAO_TIPO_TRANSPORTE_PAGE","data":{"telefone":"31900000000"},"flowToken":"myFlowToken"}

Filipe
Asked about a week ago
Filipe

A funny observation, when I run the flow on business.facebook using the preview and pointing to this same API, it works perfectly, going through all the pages without any errors and without sending this version 300 request. However, if I send the flow to my WhatsApp (it’s an iOS, but I have also tested it with an Android), it sends this version 300 and I can't execute my flow.

June 27 at 7:15 AM
Selected Answer
1

I managed to solve my problem. There was a version of my flow that was already in production, and my API was still sending this flow to WhatsApp instead of the draft flow.

And when it made the request to go to the alert page, it didn’t have this page, which caused the error, and it was sending this version 300.

I believe it sends this version 300 whenever it tries to go to a non-existent page.

3 hours ago
Filipe
Selected Answer
1

Hi Filipe, I'm going to look at this issue, if possible, please provide a flow json to help me reproduce it

Yesterday at 2:34 AM
Evgenii
1

I've tried to reproduce the problem, but failed unfortunately. Here what I've done:

  1. I've created a Flow JSON with 3 Inputs (Dropdown, TextInput, TextInput)
{
    "version": "4.0",
    "data_api_version": "3.0",
    "routing_model": {
        "FIRST_SCREEN": [
            "SECOND_SCREEN"
        ],
        "SECOND_SCREEN": []
    },
    "screens": [
        {
            "id": "FIRST_SCREEN",
            "title": "Test dropdown",
            "layout": {
                "type": "SingleColumnLayout",
                "children": [
                    {
                        "type": "TextInput",
                        "label": "First name",
                        "name": "first_name"
                    },
                    {
                        "type": "TextInput",
                        "label": "Second name",
                        "name": "second_name"
                    },
                    {
                        "type": "Dropdown",
                        "data-source": [
                            {
                                "id": "Item 1",
                                "title": "Title 1"
                            },
                            {
                                "id": "Item 2",
                                "title": "Title 2"
                            }
                        ],
                        "name": "input",
                        "label": "Select items",
                        "on-select-action": {
                            "name": "data_exchange",
                            "payload": {
                                "first": "${form.first_name}",
                                "second": "${form.second_name}",
                                "input": "${form.input}"
                            }
                        }
                    },
                    {
                        "type": "Footer",
                        "label": "Submit",
                        "on-click-action": {
                            "name": "data_exchange",
                            "payload": {
                                "first_name": "${form.first_name}",
                                "second_name": "${form.second_name}",
                                "input": "${form.input}"
                            }
                        }
                    }
                ]
            }
        },
        {
            "id": "SECOND_SCREEN",
            "terminal": true,
            "title": "Test dropdown",
            "data": {
                "first_name": {
                    "type": "string",
                    "__example__": "John"
                },
                "second_name": {
                    "type": "string",
                    "__example__": "Rack"
                },
                "input": {
                    "type": "string",
                    "__example__": "dropdown"
                }
            },
            "layout": {
                "type": "SingleColumnLayout",
                "children": [
                    {
                        "type": "Footer",
                        "label": "Submit",
                        "on-click-action": {
                            "name": "complete",
                            "payload": {
                                "first": "${data.first_name}",
                                "second": "${data.second_name}",
                                "input": "${data.input}"
                            }
                        }
                    }
                ]
            }
        }
    ]
}
  1. When dropdown value is selected, it sends the request with the following payload:

    {
    data: { first: 'jhmhkhj,m', second: 'hjhkhk', input: 'Item 1' },
    flow_token: 'AQAAAAACS5FpgQ_cAAAAAE0QI3s.',
    screen: 'FIRST_SCREEN',
    action: 'data_exchange',
    version: '3.0'
    }
    
  2. I respond to this request with:

    {
    data: { first: 'jhmhkhj,m', second: 'hjhkhk', input: 'Item 1' },
    screen: 'SECOND_SCREEN',
    version: '3.0'
    }
    
  3. I don't see any subsequent request. Filippe, could you please provide your Flow JSON as an example or direct me in repro steps.

Thank you!

Yesterday at 6:33 AM
Evgenii
Filipe

Of course, I will make the part of the flow where this error occurs

Yesterday at 6:45 AM
1

The 'LISTAR_SOLICITACAO_PAGE' page contains my Dropdown, where selecting one of my requests (fetched correctly via the API) triggers the first request to the API for processing and navigation to the 'DETALHE_SOLICITACAO_PAGE'. Initially, as shown, the API returns the correct request, even the preview on business.facebook leads to the page with the correct data. However, shortly after, the API receives a '300' request and my page encounters an error.

Note: This page is the second in my flow, and it previously worked fine. It was used for over a month in testing without issues, but recently we started experiencing errors without any changes in the flow.

Yesterday at 6:59 AM
Filipe
1
{
            "id": "LISTAR_SOLICITACAO_PAGE",
            "title": "VWAY",
            "data": {
                "solicitacoes": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "title": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            }
                        }
                    },
                    "__example__": [
                        {
                            "id": "1",
                            "title": "Consulta IDA"
                        },
                        {
                            "id": "2",
                            "title": "Transporte de Paciente - Envio"
                        }
                    ]
                },
                "telefone": {
                    "type": "string",
                    "__example__": "(31) 0000-0000"
                }
            },
            "terminal": false,
            "layout": {
                "type": "SingleColumnLayout",
                "children": [
                    {
                        "type": "Form",
                        "name": "user_data",
                        "children": [

                            {
                                "type": "TextHeading",
                                "text": "Lista de Solicitações"
                            },
                            {
                                "type": "TextSubheading",
                                "text": "Segue a baixo a lista de todos as suas solicitações!"

                            },
                            {
                                "type": "Dropdown",
                                "name": "solicitacao",
                                "label": "Solicitações",
                                "data-source": "${data.solicitacoes}",
                                "on-select-action": {
                                    "name": "data_exchange",
                                    "payload": {
                                        "solicitacao": "${form.solicitacao}",
                                        "telefone": "${data.telefone}"
                                    }
                                }
                            }
                        ]
                    }
                ]
            }
        },
        {
            "id": "DETALHE_SOLICITACAO_PAGE",
            "title": "VWAY",
            "data": {
                "solicitacao": {
                    "type": "string",
                    "__example__": ""
                },
                 "situacao": {
                    "type": "string",
                    "__example__": ""
                },
                "numSolicitacao": {
                    "type": "string",
                    "__example__": ""
                },
                "dataNecessidade": {
                    "type": "string",
                    "__example__": ""
                },
                "passageiro": {
                    "type": "string",
                    "__example__": ""
                },
                "qtdVagasDesc": {
                    "type": "string",
                    "__example__": ""
                },
                "dadosOrigem": {
                    "type": "string",
                    "__example__": ""
                },
                "dadosDestino": {
                    "type": "string",
                    "__example__": ""
                },
                "tipoTransporteDesc": {
                    "type": "string",
                    "__example__": ""
                },
                "observacao": {
                    "type": "string",
                    "__example__": ""
                },
                "cancelarDespacho": {
                    "type": "boolean",
                    "__example__": false
                },
                "telefone": {
                    "type": "string",
                    "__example__": "000000000"
                }
            },
            "terminal": false,
            "layout": {
                "type": "SingleColumnLayout",
                "children": [
                    {
                        "type": "Form",
                        "name": "user_data",
                        "children": [
                            {
                                "type": "TextHeading",
                                "text": "${data.numSolicitacao}"
                            },
                            {
                                "type": "TextSubheading",
                                "text": "${data.situacao}"
                            },
                            {
                                "type": "TextBody",
                                "text": "${data.dataNecessidade}"

                            },
                            {
                                "type": "TextBody",
                                "text": "${data.tipoTransporteDesc}"

                            },
                            {
                                "type": "TextBody",
                                "text": "${data.passageiro}"

                            },
                            {
                                "type": "TextBody",
                                "text": "${data.qtdVagasDesc}"

                            },
                            {
                                "type": "TextBody",
                                "text": "${data.dadosOrigem}"

                            },
                            {
                                "type": "TextBody",
                                "text": "${data.dadosDestino}"

                            },
                            {
                                "type": "TextCaption",
                                "text": "${data.observacao}"

                            }
                        ]
                    }
                ]
            }
        },
        {
            "id": "ALERTA_PAGE",
            "title": "Alerta",
            "data": {
                "titulo": {
                    "type": "string",
                    "__example__": "Erro"
                },
                "descricao": {
                    "type": "string",
                    "__example__": "descricao mensagem erro"
                },
                "detalhe1": {
                    "type": "string",
                    "__example__": "descricao mensagem erro"
                },
                "detalhe2": {
                    "type": "string",
                    "__example__": "descricao mensagem erro"
                }
            },
            "layout": {
                "type": "SingleColumnLayout",
                "children": [
                    {
                        "type": "Form",
                        "name": "form",
                        "children": [
                            {
                                "type": "TextHeading",
                                "text": "${data.titulo}"
                            },
                            {
                                "type": "TextSubheading",
                                "text": "${data.descricao}"

                            },
                            {
                                "type": "TextSubheading",
                                "text": "${data.detalhe1}"

                            },
                            {
                                "type": "TextSubheading",
                                "text": "${data.detalhe2}"
                            }
                        ]
                    }
                ]
            }
        }
Yesterday at 6:59 AM
Filipe
1

It's worth noting that my version is 3.1

{
    "version": "3.1",
    "data_api_version": "3.0",
    "routing_model": {
        "MENU_PAGE": [
            "CRIAR_SOLICITACAO_COM_SEM_PASSAGEIRO_PAGE",
            "LISTAR_SOLICITACAO_PAGE",
            "ALERTA_PAGE"
        ],
        "LISTAR_SOLICITACAO_PAGE": [
            "DETALHE_SOLICITACAO_PAGE",
            "ALERTA_PAGE"
        ],
        "DETALHE_SOLICITACAO_PAGE": [
            "ALERTA_PAGE"
        ],
        "ALERTA_PAGE": []
    },
Yesterday at 7:05 AM
Filipe
1

Filipe, any chance you could share a flow_id? You can find it, in the Web-Builder: https://business.facebook.com/wa/manage/flows/?business_id=&waba_id=&flow_id=

Yesterday at 8:27 AM
Evgenii
Evgenii

I'll need to check your full Flow JSON, if you have any test api I could use, that would be extra helpful!

Yesterday at 8:30 AM
Filipe

Unfortunately I cannot pass on the ID, company rules

23 hours ago
Evgenii

No problem! I'll try to replicate the flow_json you've provided

23 hours ago