Bom dia pessoal,
Estou tentando implementar o Whatsapp flows no meu bot, ele está funcionando certinho porém já tentei de tudo para tratar o retorno das informaçoes preenchidas, alguém poderia me dar uma luz de como tratar esses dados e salvar no contato?
Esse é o codigo que chama o flows no bluid
{
"recipient_type": "individual",
"messaging_product": "whatsapp",
"type": "interactive",
"interactive": {
"type": "flow",
"header": {
"type": "text",
"text": "Formulário de pré cadastro."
},
"body": {
"text": "Com essas informações conseguiremos apresentar a melhor possibilidade de empreendimento. "
},
"footer": {
"text": "preencher"
},
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "any_string_for_this_example",
"flow_id": "",
"flow_cta": "Iniciar",
"flow_action": "navigate",
"flow_action_payload": {
"screen": "screen_jdizqk",
"data": {
"type": "dynamic_object"
}
}
}
}
}
}
Esse e o retorno que vem pelo input.message em amarelo as respostas do formulario.
{
"type":"text/plain",
"content":"Sent",
"id":"wamid.HBgNNTUxMTk1MjAwNzgxNBUCABIYIEMxNEQxRjhFNkFCMDM4QTE3ODk1RkYxNEUyN0E3Q0UxAA==",
"from":"[email protected]",
"to":"[email protected]",
"metadata":{
"#wa.timestamp":"",
"#wa.context.from":"",
"#wa.context.id":"wamid.HBgNNTUxMTk1MjAwNzgxNBUCABEYEkIwN0Q3MjI3MDg5NDQxMDk3NAA=",
"#wa.context.group_id":null,
"#wa.forwarded":null,
"#wa.frequently_forwarded":null,
"#wa.interactive.nfm_reply.json_response":"{\"screen_2_Dropdown_0\":\"1_Investimento\",\"screen_2_Dropdown_1\":\"2_Parentes\",\"screen_2_Dropdown_2\":\"2_Zona_Oeste\",\"screen_2_TextInput_3\":\"Teste\",\"screen_2_Dropdown_4\":\"3_Sobrado_Individual\",\"screen_2_Dropdown_5\":\"3_acima_de_3\",\"screen_1_Dropdown_0\":\"4_acima_de_4\",\"screen_1_Dropdown_1\":\"1_Bancários_(Caixa_Econômica,_Bradesco,_Itaú,_Etc...)\",\"screen_1_Dropdown_2\":\"2_R$_4.501_a_R$_6.000\",\"screen_1_Dropdown_3\":\"2_Funcionário_Publico\",\"screen_0_TextInput_0\":\"Luiz\",\"screen_0_TextInput_1\":\"Felipe\",\"screen_0_TextInput_2\":\"11966666666\",\"screen_0_TextInput_3\":\"[email protected]\",\"screen_0_Dropdown_4\":\"1_Solteiro\",\"flow_token\":\"any_string_for_this_example\"}",
"traceparent":"00-65999ceba47ebc76ead34480bb0eada9-d07305604335d781-01",
"#inReplyToId":"wamid.HBgNNTUxMTk1MjAwNzgxNBUCABEYEkIwN0Q3MjI3MDg5NDQxMDk3NAA=",
"#messageReferenceInternalID":"",
"#uniqueId":"",
"#date_processed":"",
"date_created":"",
"#tunnel.owner":"",
"#tunnel.originator":"",
"#tunnel.originalFrom":"[email protected]/msging-application-router-hosting-enterprise-6dc6fd999f-qq5np",
"#tunnel.originalTo":"captacaofunil%[email protected]/5511952007814%40wa.gw.msging.net",
"#replyContent":"{\"replied\":{\"type\":\"text/plain\",\"value\":\"Sent\"},\"inReplyTo\":{\"id\":\"2c0dfa53-318b-4453-9075-92e959596c92\",\"type\":\"application/json\",\"value\":{\"recipient_type\":\"individual\",\"messaging_product\":\"whatsapp\",\"type\":\"interactive\",\"interactive\":{\"type\":\"flow\",\"header\":{\"type\":\"text\",\"text\":\"Formulário de pré cadastro.\"},\"body\":{\"text\":\"Com essas informações conseguiremos apresentar a melhor possibilidade de empreendimento. \"},\"footer\":{\"text\":\"Casa Fort Cooperativa Habitacional\"},\"action\":{\"name\":\"flow\",\"parameters\":{\"flow_message_version\":\"3\",\"flow_token\":\"any_string_for_this_example\",\"flow_id\":\"1051974283269760\",\"flow_cta\":\"Iniciar\",\"flow_action\":\"navigate\",\"flow_action_payload\":{\"screen\":\"screen_jdizqk\",\"data\":{\"type\":\"dynamic_object\"}}}}}},\"direction\":\"sent\"}}"
}
}