{"tools":[{"_id":"68e87bd05a1b241a303d9583","pageId":"68d244baecec34bc4d5273d9","name":"order_status_test_form","description":"Two-field order status checker (email + order number).","tags":["order","status","shopify","test"],"isActive":true,"type":"forms","typeData":{"forms":{"buttonText":"Gönder","inputs":{"email":{"enabled":true,"placeholder":"Email"},"name":{"enabled":false},"phone":{"enabled":false},"custom":[{"key":"number","label":"Order Number","placeholder":"Sipariş Numarası","enabled":true}]},"apiConfig":{"request":{"method":"POST","url":"https://api-v2.juphy.com/shopify-orders/status","headers":{"Content-Type":"application/json"},"body":{"pageId":"68d244baecec34bc4d5273d9"}},"paramMapping":{"map":{"email":"body.email","number":"body.number"},"transforms":[{"field":"email","op":"trim"},{"field":"email","op":"toLowerCase"},{"field":"number","op":"trim"}]},"response":{"pickFields":["orderByNumber[0]"],"responseInstruction":"Return one static HTML string with all values inserted from TOOL_RESULT. CRITICAL: Detect customer language from conversation history and translate the two text labels accordingly. No Vue bindings. No backticks.\n\nData:\n- const order = TOOL_RESULT[\"orderByNumber[0]\"] || {};\n- const name = order.name || '';\n- const fulfillment_status = order.fulfillment_status || '';\n- const currency = order.currency || '';\n- const tracking_url = (order.fulfillments && order.fulfillments[0] && order.fulfillments[0].tracking_url) || '';\n- const order_status_url = order.order_status_url || '';\n- const items = Array.isArray(order.line_items) ? order.line_items : [];\n- const url = tracking_url || order_status_url || '#';\n- const statusText = fulfillment_status ? (fulfillment_status.charAt(0).toUpperCase() + fulfillment_status.slice(1)) : '';\n- const currencySymbol = (currency==='TRY'?'₺':currency==='USD'?'$':currency==='EUR'?'€':currency==='GBP'?'£':'');\n\nLANGUAGE DETECTION & TRANSLATIONS:\nAnalyze the conversation history to detect user's language. Then use these translations:\n\nTurkish: statusLabel=\"Durum:\", buttonText=\"Sipariş Detaylarını Görüntüle\"\nEnglish: statusLabel=\"Status:\", buttonText=\"View Order Details\"\nGerman: statusLabel=\"Status:\", buttonText=\"Bestelldetails anzeigen\"\nFrench: statusLabel=\"Statut:\", buttonText=\"Voir les détails\"\nSpanish: statusLabel=\"Estado:\", buttonText=\"Ver detalles\"\nDefault: English\n\nRules:\n1) Render up to 10 items with name and price (if both price and currencySymbol exist).\n2) Omit status block if statusText empty. Omit list if items empty. Omit button if url is '#'.\n3) Output this structure with values AND TRANSLATED LABELS filled:\n\n<div class=\"richMsg order\">\n  <div style=\"display: flex; flex-direction: column; width: 100%; margin: 0 auto; background: #fff; border-radius: 12px; padding: 20px;\">\n    [STATUS_DIV]\n    [ITEMS_UL]\n    [BUTTON_DIV]\n  </div>\n</div>\n\nWhere:\n- [STATUS_DIV] => if statusText:\n  <div style=\"margin-bottom: 20px\"><span style=\"padding: 8px 16px; border-radius: 6px; font-size: 14px; background-color: #f5f5f5; display: inline-block; font-weight: 500; color: #262323;\">[statusLabel] [statusText]</span></div>\n  Example Turkish: <div...><span...>Durum: Fulfilled</span></div>\n  Example English: <div...><span...>Status: Fulfilled</span></div>\n\n- [ITEMS_UL] => if items.length>0:\n  <ul style=\"padding: 0; margin: 0 0 16px 0; width: 100%\">[ITEM_ROWS]</ul>\n\n- [ITEM_ROWS] => for each item (max 10):\n  <li style=\"list-style: none; margin-bottom: 12px\"><div style=\"display: flex; justify-content: space-between; align-items: center; font-size: 15px; line-height: 1.4;\"><span style=\"color: #2c3338; flex: 1; padding-right: 16px\">[item.name]</span>[ITEM_PRICE]</div></li>\n\n- [ITEM_PRICE] => if item.price && currencySymbol:\n  <span style=\"color: #2c3338; font-weight: 500; display: flex; align-items: center; gap: 4px;\"><span>[currencySymbol]</span><span>[item.price]</span></span>\n\n- [BUTTON_DIV] => if url!='#':\n  <div class=\"richMsgButton\"><a style=\"color: #ffffff; background-color: #202020; text-align: center; border: none; width: 100%; border-radius: 24px; padding: 12px; text-decoration: none; display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 15px; transition: opacity 0.2s ease;\" target=\"_blank\" href=\"[url]\" type=\"button\">[buttonText]</a></div>\n  Example Turkish: <a...>Sipariş Detaylarını Görüntüle</a>\n  Example English: <a...>View Order Details</a>\n\nReturn only the final HTML string with detected language translations applied."}},"aiTool":{"name":"order_status_test_form","description":"CALL THIS TOOL ONLY when the user wants to know their order","parameters":{"type":"object","properties":{"juphyInstructionText":{"type":"string","description":"Instruction text is shown above the form. Give examples of \"example@mail.com, #1234. Customers need to fill in both inputs"}},"required":["juphyInstructionText"],"additionalProperties":false},"strict":true}}}}]}