{
    "name": "WhatsApp Flow response parser - synthetic practice only",
    "flow": [
        {
            "id": 1,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": ""
            },
            "mapper": {
                "json": "[{\"case\":\"yes-with-comment\",\"expected_helpful\":\"yes\",\"expected_comment\":\"The instructions were clear.\",\"interactive\":{\"type\":\"nfm_reply\",\"nfm_reply\":{\"response_json\":\"{\\\"flow_token\\\":\\\"SYNTHETIC_TEST_ONLY\\\",\\\"helpful\\\":\\\"yes\\\",\\\"comment\\\":\\\"The instructions were clear.\\\"}\"}}},{\"case\":\"no-blank-comment\",\"expected_helpful\":\"no\",\"expected_comment\":\"[not provided]\",\"interactive\":{\"type\":\"nfm_reply\",\"nfm_reply\":{\"response_json\":\"{\\\"flow_token\\\":\\\"SYNTHETIC_TEST_ONLY\\\",\\\"helpful\\\":\\\"no\\\",\\\"comment\\\":\\\"\\\"}\"}}},{\"case\":\"yes-missing-comment\",\"expected_helpful\":\"yes\",\"expected_comment\":\"[not provided]\",\"interactive\":{\"type\":\"nfm_reply\",\"nfm_reply\":{\"response_json\":\"{\\\"flow_token\\\":\\\"SYNTHETIC_TEST_ONLY\\\",\\\"helpful\\\":\\\"yes\\\"}\"}}}]"
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0,
                    "name": "Three synthetic Flow completions"
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Choose a data structure"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": ""
            },
            "mapper": {
                "json": "{{1.interactive.nfm_reply.response_json}}"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0,
                    "name": "Parse response_json"
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Choose a data structure"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 3,
            "module": "util:SetVariables",
            "version": 1,
            "parameters": {},
            "mapper": {
                "scope": "roundtrip",
                "variables": [
                    {
                        "name": "case",
                        "value": "{{1.case}}"
                    },
                    {
                        "name": "helpful",
                        "value": "{{2.helpful}}"
                    },
                    {
                        "name": "comment",
                        "value": "{{ifempty(2.comment; \"[not provided]\")}}"
                    }
                ]
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0,
                    "name": "Read the submitted fields"
                },
                "interface": [
                    {
                        "name": "case",
                        "label": "case",
                        "type": "any"
                    },
                    {
                        "name": "helpful",
                        "label": "helpful",
                        "type": "any"
                    },
                    {
                        "name": "comment",
                        "label": "comment",
                        "type": "any"
                    }
                ]
            }
        },
        {
            "id": 4,
            "module": "util:SetVariables",
            "version": 1,
            "parameters": {},
            "mapper": {
                "scope": "roundtrip",
                "variables": [
                    {
                        "name": "case",
                        "value": "{{3.case}}"
                    },
                    {
                        "name": "helpful",
                        "value": "{{3.helpful}}"
                    },
                    {
                        "name": "comment",
                        "value": "{{3.comment}}"
                    },
                    {
                        "name": "helpful_matches",
                        "value": "{{3.helpful = 1.expected_helpful}}"
                    },
                    {
                        "name": "comment_matches",
                        "value": "{{3.comment = 1.expected_comment}}"
                    }
                ]
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0,
                    "name": "Check all three expected results"
                },
                "interface": [
                    {
                        "name": "case",
                        "label": "case",
                        "type": "any"
                    },
                    {
                        "name": "helpful",
                        "label": "helpful",
                        "type": "any"
                    },
                    {
                        "name": "comment",
                        "label": "comment",
                        "type": "any"
                    },
                    {
                        "name": "helpful_matches",
                        "label": "helpful_matches",
                        "type": "any"
                    },
                    {
                        "name": "comment_matches",
                        "label": "comment_matches",
                        "type": "any"
                    }
                ]
            }
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "eu1.make.com",
        "notes": []
    }
}