====== Fetch Customer Form Results via API ====== This guide helps you set up a simple API call in the CX Genie customer service system to get form results from a specific customer form. You don’t need a technical background — just follow the steps carefully! ===== Step 1: Create a Workflow with API Call Block ===== - Go to your workflow editor in CX Genie. - Add a block called **API Call** to your workflow. ===== Step 2: Prepare the API URL ===== ==== Choose the Environment ==== Use the correct base API URL depending on where you're working: ^ Environment ^ API Root URL ^ | QC UAT | https://api.uat.cxgenie.ai/api/v1/form-results-value/customer? | ==== Get Your Form ID ==== To connect to the correct form, you need a **Form ID**. Here's how to find it: - Open your form builder from the UI. - Look at the address bar (URL). It will look like this: `https://staging-app.cxgenie.ai/workspaces/{workspace-id}/form-builder/{form-id}` The part at the end is your **form ID**. **Example:** `b1f5393f-8387-41ea-98f6-34982a5c1bab` ==== Add Query Parameters ==== You’ll need to add two types of info to the API URL: * **Form ID** Add it like this: `?form_id=b1f5393f-8387-41ea-98f6-34982a5c1bab` * **Properties** (Optional) If you want to get specific data fields from the form (e.g., `transaction_id`, `agent_name`), add them like this: * **Comma-separated method:** `&properties=transaction_id,agent_name` **Tip:** You can find the property names by opening your form in the form builder. Each input has a **Property** value — use that. ==== Final Example URL ==== If you combine everything, your full API URL might look like: `https://api-staging.cxgenie.ai/api/v1/form-results-value/customer?form_id=b1f5393f-8387-41ea-98f6-34982a5c1bab&properties=transaction_id,agent_name` ===== Step 3: Add the API URL to the API Call Block ===== - Paste the full API URL into the **URL** field. - Choose the **GET** method. - Save the block and test it. ===== What Happens After Success? ===== You’ll receive a message in the chat window if everything works. Example result: { "success": true } That means the API call worked and your data was fetched! ===== 🎉 You're Done! ===== You’ve successfully added an API call to your workflow! The rest of your blocks will work as usual, and now you can fetch customer form results directly in your workflow.