{
  "product": "happytree-node.workflows",
  "formatVersion": 1,
  "workflows": [
    {
      "id": "workflow-1",
      "workflow": {
        "product": "happytree-node.workflow",
        "formatVersion": 1,
        "blueprint": {
          "name": "E06 \u00B7 01 Selecionar compras para pesquisa",
          "nodes": [
            {
              "id": "fonte",
              "type": "files.read-json",
              "settings": {
                "sourceId": "__htn_configurar__"
              },
              "x": 0,
              "y": 0
            },
            {
              "id": "tabela",
              "type": "tables.from-json",
              "settings": {},
              "x": 290,
              "y": 0
            },
            {
              "id": "autorizados",
              "type": "tables.filter",
              "settings": {
                "comparison": "Igual a",
                "value": "sim",
                "ignoreCase": false,
                "column": "contato_autorizado"
              },
              "x": 580,
              "y": 0
            },
            {
              "id": "entregues",
              "type": "tables.filter",
              "settings": {
                "comparison": "Igual a",
                "value": "entregue",
                "ignoreCase": false,
                "column": "status"
              },
              "x": 870,
              "y": 0
            },
            {
              "id": "janela-inicio",
              "type": "tables.filter",
              "settings": {
                "comparison": "Maior ou igual",
                "value": "5",
                "ignoreCase": false,
                "column": "dias_desde_compra"
              },
              "x": 1160,
              "y": 0
            },
            {
              "id": "janela-fim",
              "type": "tables.filter",
              "settings": {
                "comparison": "Menor ou igual",
                "value": "10",
                "ignoreCase": false,
                "column": "dias_desde_compra"
              },
              "x": 0,
              "y": 180
            },
            {
              "id": "unicos",
              "type": "tables.distinct",
              "settings": {
                "keys": "compra_id",
                "keep": "Primeiro",
                "ignoreCase": false
              },
              "x": 290,
              "y": 180
            },
            {
              "id": "painel",
              "type": "bi.explore",
              "settings": {
                "title": "P\u00FAblico eleg\u00EDvel para a pesquisa",
                "definition": "{\u0022filters\u0022: [{\u0022column\u0022: \u0022etapa\u0022, \u0022title\u0022: \u0022Etapa\u0022, \u0022kind\u0022: \u0022category\u0022}], \u0022panels\u0022: [{\u0022title\u0022: \u0022Compras eleg\u00EDveis\u0022, \u0022kind\u0022: \u0022indicator\u0022, \u0022operation\u0022: \u0022count\u0022, \u0022valueColumn\u0022: \u0022\u0022, \u0022categoryColumn\u0022: \u0022\u0022, \u0022seriesColumn\u0022: \u0022\u0022, \u0022unit\u0022: \u0022\u0022}, {\u0022title\u0022: \u0022Compras por etapa\u0022, \u0022kind\u0022: \u0022bar\u0022, \u0022operation\u0022: \u0022count\u0022, \u0022valueColumn\u0022: \u0022\u0022, \u0022categoryColumn\u0022: \u0022etapa\u0022, \u0022seriesColumn\u0022: \u0022\u0022, \u0022unit\u0022: \u0022\u0022}]}"
              },
              "x": 580,
              "y": 180
            },
            {
              "id": "html-claro",
              "type": "bi.export-html",
              "settings": {
                "name": "publico-pos-venda-claro.html",
                "theme": "Claro",
                "interactive": true
              },
              "x": 870,
              "y": 180
            },
            {
              "id": "html-escuro",
              "type": "bi.export-html",
              "settings": {
                "name": "publico-pos-venda-escuro.html",
                "theme": "Escuro",
                "interactive": true
              },
              "x": 1160,
              "y": 180
            }
          ],
          "edges": [
            {
              "source": "fonte",
              "target": "tabela",
              "order": 0
            },
            {
              "source": "tabela",
              "target": "autorizados",
              "order": 0
            },
            {
              "source": "autorizados",
              "target": "entregues",
              "order": 0
            },
            {
              "source": "entregues",
              "target": "janela-inicio",
              "order": 0
            },
            {
              "source": "janela-inicio",
              "target": "janela-fim",
              "order": 0
            },
            {
              "source": "janela-fim",
              "target": "unicos",
              "order": 0
            },
            {
              "source": "unicos",
              "target": "painel",
              "order": 0
            },
            {
              "source": "painel",
              "target": "html-claro",
              "order": 0
            },
            {
              "source": "painel",
              "target": "html-escuro",
              "order": 0
            }
          ],
          "schemaVersion": 1
        },
        "requiredBindings": [
          {
            "nodeId": "fonte",
            "nodeName": "Ler arquivo JSON",
            "property": "sourceId",
            "title": "Fonte do projeto",
            "kind": "project-source"
          }
        ]
      }
    },
    {
      "id": "workflow-2",
      "workflow": {
        "product": "happytree-node.workflow",
        "formatVersion": 1,
        "blueprint": {
          "name": "E06 \u00B7 02 Preparar lembretes para revis\u00E3o",
          "nodes": [
            {
              "id": "fonte",
              "type": "files.read-json",
              "settings": {
                "sourceId": "__htn_configurar__"
              },
              "x": 0,
              "y": 0
            },
            {
              "id": "tabela",
              "type": "tables.from-json",
              "settings": {},
              "x": 290,
              "y": 0
            },
            {
              "id": "autorizados",
              "type": "tables.filter",
              "settings": {
                "comparison": "Igual a",
                "value": "sim",
                "ignoreCase": false,
                "column": "contato_autorizado"
              },
              "x": 580,
              "y": 0
            },
            {
              "id": "entregues",
              "type": "tables.filter",
              "settings": {
                "comparison": "Igual a",
                "value": "entregue",
                "ignoreCase": false,
                "column": "status"
              },
              "x": 870,
              "y": 0
            },
            {
              "id": "janela-inicio",
              "type": "tables.filter",
              "settings": {
                "comparison": "Maior ou igual",
                "value": "5",
                "ignoreCase": false,
                "column": "dias_desde_compra"
              },
              "x": 1160,
              "y": 0
            },
            {
              "id": "janela-fim",
              "type": "tables.filter",
              "settings": {
                "comparison": "Menor ou igual",
                "value": "10",
                "ignoreCase": false,
                "column": "dias_desde_compra"
              },
              "x": 0,
              "y": 180
            },
            {
              "id": "unicos",
              "type": "tables.distinct",
              "settings": {
                "keys": "compra_id",
                "keep": "Primeiro",
                "ignoreCase": false
              },
              "x": 290,
              "y": 180
            },
            {
              "id": "cada-compra",
              "type": "flow.foreach",
              "settings": {
                "maxItems": 100
              },
              "x": 580,
              "y": 180
            },
            {
              "id": "rascunho",
              "type": "communications.whatsapp-data",
              "settings": {
                "key": "guia06-pesquisa-{{/compra_id}}",
                "targetType": "Telefone",
                "to": "{{/telefone}}",
                "body": "Ol\u00E1, {{/cliente}}! Como foi a experi\u00EAncia da compra {{/compra_id}}? Quando puder, responda \u00E0 pesquisa: {{/link_pesquisa}}. Obrigado!",
                "browser": "Google Chrome",
                "sendMode": "Somente preparar",
                "closeAfterSend": true,
                "batchDelaySeconds": 8,
                "attachmentSourceId": "",
                "attachmentMode": "Documento"
              },
              "x": 870,
              "y": 180
            },
            {
              "id": "fim",
              "type": "flow.end",
              "settings": {
                "loopId": "cada-compra"
              },
              "x": 1160,
              "y": 180
            }
          ],
          "edges": [
            {
              "source": "fonte",
              "target": "tabela",
              "order": 0
            },
            {
              "source": "tabela",
              "target": "autorizados",
              "order": 0
            },
            {
              "source": "autorizados",
              "target": "entregues",
              "order": 0
            },
            {
              "source": "entregues",
              "target": "janela-inicio",
              "order": 0
            },
            {
              "source": "janela-inicio",
              "target": "janela-fim",
              "order": 0
            },
            {
              "source": "janela-fim",
              "target": "unicos",
              "order": 0
            },
            {
              "source": "unicos",
              "target": "cada-compra",
              "order": 0
            },
            {
              "source": "cada-compra",
              "target": "rascunho",
              "order": 0
            },
            {
              "source": "rascunho",
              "target": "fim",
              "order": 0
            }
          ],
          "schemaVersion": 1
        },
        "requiredBindings": [
          {
            "nodeId": "fonte",
            "nodeName": "Ler arquivo JSON",
            "property": "sourceId",
            "title": "Fonte do projeto",
            "kind": "project-source"
          }
        ]
      }
    },
    {
      "id": "workflow-3",
      "workflow": {
        "product": "happytree-node.workflow",
        "formatVersion": 1,
        "blueprint": {
          "name": "E06 \u00B7 03 Criar pesquisa de satisfa\u00E7\u00E3o (opcional)",
          "nodes": [
            {
              "id": "pesquisa",
              "type": "googleforms.create",
              "settings": {
                "creationKey": "guia06-pesquisa-satisfacao-v1",
                "browser": "Google Chrome",
                "spreadsheetMode": "Criar nova",
                "spreadsheetUrl": "",
                "spreadsheetTitle": "Respostas da pesquisa de satisfa\u00E7\u00E3o",
                "publish": false,
                "stepDelayMs": 1000,
                "timeoutSeconds": 600,
                "definition": "{\u0022titulo\u0022: \u0022Como foi sua experi\u00EAncia?\u0022, \u0022descricao\u0022: \u0022Pesquisa de satisfa\u00E7\u00E3o do exerc\u00EDcio HappyTreeNode. Substitua pelos dados e pelo aviso de privacidade do seu neg\u00F3cio antes de publicar.\u0022, \u0022perguntas\u0022: [{\u0022titulo\u0022: \u0022C\u00F3digo da compra\u0022, \u0022tipo\u0022: \u0022texto\u0022, \u0022obrigatoria\u0022: true}, {\u0022titulo\u0022: \u0022Como voc\u00EA avalia a experi\u00EAncia?\u0022, \u0022tipo\u0022: \u0022lista\u0022, \u0022opcoes\u0022: [\u00221\u0022, \u00222\u0022, \u00223\u0022, \u00224\u0022, \u00225\u0022], \u0022obrigatoria\u0022: true}, {\u0022titulo\u0022: \u0022O que podemos melhorar?\u0022, \u0022tipo\u0022: \u0022paragrafo\u0022, \u0022obrigatoria\u0022: false}]}"
              },
              "x": 0,
              "y": 0
            }
          ],
          "edges": [],
          "schemaVersion": 1
        },
        "requiredBindings": []
      }
    },
    {
      "id": "workflow-4",
      "workflow": {
        "product": "happytree-node.workflow",
        "formatVersion": 1,
        "blueprint": {
          "name": "E06 \u00B7 04 Analisar respostas e casos de retorno",
          "nodes": [
            {
              "id": "fonte",
              "type": "files.read-json",
              "settings": {
                "sourceId": "__htn_configurar__"
              },
              "x": 0,
              "y": 0
            },
            {
              "id": "tabela",
              "type": "tables.from-json",
              "settings": {},
              "x": 290,
              "y": 0
            },
            {
              "id": "retornar",
              "type": "tables.filter",
              "settings": {
                "comparison": "Menor ou igual",
                "value": "2",
                "ignoreCase": false,
                "column": "nota"
              },
              "x": 580,
              "y": 0
            },
            {
              "id": "painel",
              "type": "bi.explore",
              "settings": {
                "title": "Satisfa\u00E7\u00E3o e acompanhamento",
                "definition": "{\u0022filters\u0022: [{\u0022column\u0022: \u0022canal\u0022, \u0022title\u0022: \u0022Canal\u0022, \u0022kind\u0022: \u0022category\u0022}, {\u0022column\u0022: \u0022faixa_nota\u0022, \u0022title\u0022: \u0022Nota\u0022, \u0022kind\u0022: \u0022category\u0022}], \u0022panels\u0022: [{\u0022title\u0022: \u0022Respostas\u0022, \u0022kind\u0022: \u0022indicator\u0022, \u0022operation\u0022: \u0022count\u0022, \u0022valueColumn\u0022: \u0022\u0022, \u0022categoryColumn\u0022: \u0022\u0022, \u0022seriesColumn\u0022: \u0022\u0022, \u0022unit\u0022: \u0022\u0022}, {\u0022title\u0022: \u0022Nota m\u00E9dia\u0022, \u0022kind\u0022: \u0022indicator\u0022, \u0022operation\u0022: \u0022mean\u0022, \u0022valueColumn\u0022: \u0022nota\u0022, \u0022categoryColumn\u0022: \u0022\u0022, \u0022seriesColumn\u0022: \u0022\u0022, \u0022unit\u0022: \u0022\u0022}, {\u0022title\u0022: \u0022Respostas por nota\u0022, \u0022kind\u0022: \u0022bar\u0022, \u0022operation\u0022: \u0022count\u0022, \u0022valueColumn\u0022: \u0022\u0022, \u0022categoryColumn\u0022: \u0022faixa_nota\u0022, \u0022seriesColumn\u0022: \u0022\u0022, \u0022unit\u0022: \u0022\u0022}]}"
              },
              "x": 870,
              "y": 0
            },
            {
              "id": "html-claro",
              "type": "bi.export-html",
              "settings": {
                "name": "satisfacao-clientes-claro.html",
                "theme": "Claro",
                "interactive": true
              },
              "x": 1160,
              "y": 0
            },
            {
              "id": "html-escuro",
              "type": "bi.export-html",
              "settings": {
                "name": "satisfacao-clientes-escuro.html",
                "theme": "Escuro",
                "interactive": true
              },
              "x": 0,
              "y": 180
            }
          ],
          "edges": [
            {
              "source": "fonte",
              "target": "tabela",
              "order": 0
            },
            {
              "source": "tabela",
              "target": "retornar",
              "order": 0
            },
            {
              "source": "tabela",
              "target": "painel",
              "order": 0
            },
            {
              "source": "painel",
              "target": "html-claro",
              "order": 0
            },
            {
              "source": "painel",
              "target": "html-escuro",
              "order": 0
            }
          ],
          "schemaVersion": 1
        },
        "requiredBindings": [
          {
            "nodeId": "fonte",
            "nodeName": "Ler arquivo JSON",
            "property": "sourceId",
            "title": "Fonte do projeto",
            "kind": "project-source"
          }
        ]
      }
    }
  ]
}