{"id":23,"date":"2026-04-10T19:38:40","date_gmt":"2026-04-10T19:38:40","guid":{"rendered":"https:\/\/blueoceanfinance.ai\/?page_id=23"},"modified":"2026-04-10T20:25:58","modified_gmt":"2026-04-10T20:25:58","slug":"centrue-ai-fin-agent","status":"publish","type":"page","link":"https:\/\/blueoceanfinance.ai\/?page_id=23","title":{"rendered":"Centrue AI Fin Agent"},"content":{"rendered":"\n<div id=\"blueocean-upload-app\" style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; max-width: 650px; margin: 40px auto; padding: 30px; background: #ffffff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #e0e0e0;\">\n  \n  <h2 style=\"text-align: center; color: #0044cc; margin-top: 0;\">AI Financial Engine<\/h2>\n  <p style=\"text-align: center; color: #666; font-size: 14px; margin-bottom: 25px;\">Upload all relevant documents for automated reconciliation.<\/p>\n\n  <form id=\"uploadForm\">\n    <div style=\"margin-bottom: 20px;\">\n      <label for=\"tenant_id\" style=\"display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: #333;\">Tenant ID<\/label>\n      <input type=\"text\" id=\"tenant_id\" name=\"tenant_id\" value=\"test-mandant-001\" required style=\"width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; box-sizing: border-box;\">\n    <\/div>\n\n    <div style=\"padding: 15px; background-color: #f8fbff; border: 1px solid #e0eaf5; border-radius: 8px; margin-bottom: 25px;\">\n      <h3 style=\"margin-top: 0; font-size: 15px; color: #0044cc; margin-bottom: 15px;\">Required Documents<\/h3>\n      \n      <div style=\"margin-bottom: 15px;\">\n        <label for=\"bank_statement\" style=\"display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #333;\">1. Bank Statement (Required)<\/label>\n        <input type=\"file\" id=\"bank_statement\" accept=\".pdf, .png, .jpg, .jpeg\" required style=\"width: 100%; padding: 8px; border: 1px dashed #0044cc; background: #fff; border-radius: 4px; font-size: 13px; box-sizing: border-box;\">\n      <\/div>\n\n      <div style=\"margin-bottom: 15px;\">\n        <label for=\"incoming_invoices\" style=\"display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #333;\">2. Purchase Invoices \/ Incoming (Optional)<\/label>\n        <input type=\"file\" id=\"incoming_invoices\" accept=\".pdf, .png, .jpg, .jpeg, .zip\" style=\"width: 100%; padding: 8px; border: 1px dashed #999; background: #fff; border-radius: 4px; font-size: 13px; box-sizing: border-box;\">\n      <\/div>\n\n      <div style=\"margin-bottom: 10px;\">\n        <label for=\"outgoing_invoices\" style=\"display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #333;\">3. Sales Invoices \/ Outgoing (Optional)<\/label>\n        <input type=\"file\" id=\"outgoing_invoices\" accept=\".pdf, .png, .jpg, .jpeg, .zip\" style=\"width: 100%; padding: 8px; border: 1px dashed #999; background: #fff; border-radius: 4px; font-size: 13px; box-sizing: border-box;\">\n      <\/div>\n    <\/div>\n\n    <button type=\"submit\" id=\"submitBtn\" style=\"width: 100%; padding: 12px; background-color: #0044cc; color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.3s;\">\n      Start AI Reconciliation\n    <\/button>\n  <\/form>\n\n  <div id=\"statusMessage\" style=\"margin-top: 20px; padding: 12px; border-radius: 6px; font-size: 14px; text-align: center; display: none;\"><\/div>\n\n  <div id=\"resultBox\" style=\"display: none; margin-top: 30px; border-top: 2px solid #eee; padding-top: 20px;\">\n    <h3 style=\"color: #333; margin-top: 0; font-size: 16px;\">AI Reconciliation Result:<\/h3>\n    <div id=\"aiResultText\" style=\"background: #f8fbff; padding: 15px; border-radius: 6px; border-left: 4px solid #0044cc; font-size: 14px; color: #333; white-space: pre-wrap; font-family: monospace; line-height: 1.6; overflow-x: auto;\">\n      <\/div>\n  <\/div>\n\n<\/div>\n\n<script>\n  document.getElementById('uploadForm').addEventListener('submit', async function(e) {\n    e.preventDefault();\n    \n    const submitBtn = document.getElementById('submitBtn');\n    const statusDiv = document.getElementById('statusMessage');\n    const resultBox = document.getElementById('resultBox');\n    const aiResultText = document.getElementById('aiResultText');\n    \n    submitBtn.textContent = 'AI is crunching the numbers... (This takes 10-30 sec)';\n    submitBtn.style.backgroundColor = '#666';\n    submitBtn.disabled = true;\n    statusDiv.style.display = 'none';\n    resultBox.style.display = 'none';\n\n    const formData = new FormData();\n    formData.append('tenant_id', document.getElementById('tenant_id').value);\n    \n    const bankFile = document.getElementById('bank_statement').files[0];\n    if (bankFile) formData.append('bank_statement', bankFile);\n\n    const incomingFile = document.getElementById('incoming_invoices').files[0];\n    if (incomingFile) formData.append('incoming_invoices', incomingFile);\n\n    const outgoingFile = document.getElementById('outgoing_invoices').files[0];\n    if (outgoingFile) formData.append('outgoing_invoices', outgoingFile);\n\n    try {\n      const n8nWebhookUrl = 'https:\/\/blueoceanprivacy.app.n8n.cloud\/webhook\/dify-upload'; \n      \n      const response = await fetch(n8nWebhookUrl, {\n        method: 'POST',\n        body: formData\n      });\n\n      if (response.ok) {\n        const responseData = await response.json();\n        \n        let finalOutput = \"No readable output was found in the server response.\";\n        if (responseData.answer) {\n            finalOutput = responseData.answer;\n        } else if (responseData.data && responseData.data.answer) {\n            finalOutput = responseData.data.answer;\n        } else if (responseData.text) {\n            finalOutput = responseData.text;\n        } else {\n            finalOutput = JSON.stringify(responseData, null, 2);\n        }\n\n        statusDiv.textContent = '\u2705 Reconciliation successfully completed!';\n        statusDiv.style.display = 'block';\n        statusDiv.style.backgroundColor = '#e8f5e9';\n        statusDiv.style.color = '#2e7d32';\n        \n        aiResultText.textContent = finalOutput;\n        resultBox.style.display = 'block';\n        \n        document.getElementById('uploadForm').reset();\n      } else {\n        \/\/ Wir fangen auch HTTP-Fehler vom Server ab\n        const errorText = await response.text();\n        throw new Error(`Server Status ${response.status}: ${errorText}`);\n      }\n    } catch (error) {\n      console.error('Upload Error:', error);\n      \/\/ HIER IST DIE NEUE, DETAILLIERTE FEHLERMELDUNG\n      statusDiv.innerHTML = `\u274c <b>Upload failed!<\/b><br><br><b>Error Detail:<\/b> ${error.message}<br><br><i>Tipp: Wenn hier \"Failed to fetch\" steht, blockiert CORS den Upload oder der n8n Workflow ist nicht auf \"Active\" gestellt.<\/i>`;\n      statusDiv.style.display = 'block';\n      statusDiv.style.backgroundColor = '#ffebee';\n      statusDiv.style.color = '#c62828';\n    } finally {\n      submitBtn.textContent = 'Start New Reconciliation';\n      submitBtn.style.backgroundColor = '#0044cc';\n      submitBtn.disabled = false;\n    }\n  });\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>AI Financial Engine Upload all relevant documents for automated reconciliation. Tenant ID Required Documents 1. Bank Statement (Required) 2. Purchase Invoices \/ Incoming (Optional) 3. Sales Invoices \/ Outgoing (Optional) Start AI Reconciliation AI Reconciliation Result:<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-23","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=\/wp\/v2\/pages\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":5,"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=\/wp\/v2\/pages\/23\/revisions"}],"predecessor-version":[{"id":28,"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=\/wp\/v2\/pages\/23\/revisions\/28"}],"wp:attachment":[{"href":"https:\/\/blueoceanfinance.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}