### Workflow Start Parameters Example Source: https://www.domo.com/docs/portal/kspv2orr3oi30-workflows-product-api Example of a 'data' object for a workflow that accepts two numerical inputs. ```json { "parameter1": 13, "parameter2": 7 } ``` -------------------------------- ### Example startObject for Workflow Source: https://www.domo.com/docs/portal/Partner-Developers/Guides/start-a-remote-workflow An example of the `startObject` structure required when initiating a workflow. Ensure the keys and data types match the workflow's defined start inputs. ```json { "userId": "123", "role": 1, "name": "John Doe" } ``` -------------------------------- ### Workflow Instance Start Response Source: https://www.domo.com/docs/portal/kspv2orr3oi30-workflows-product-api Example HTTP response upon successfully starting a workflow instance. The 'status' field indicates the workflow's current state. ```json HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 { "id": "2052e10a-d142-4391-a731-2be1ab1c0188", // id of the newly created workflow instance "modelId": "a8afdc89-9491-4ee4-b7c3-b9e9b86c0138", // id of the workflow "modelName": "AddTwoNumbers", // name of the workflow "modelVersion": "1.1.0", // workflow version number "createdBy": "8811501", // user id of workflow creator "createdOn": "2023-11-15T15:28:57.479Z", "updatedBy": "8811501", "updatedOn": "2023-11-15T15:28:57.479Z", "status": "null" } ``` -------------------------------- ### Workflow Start HTTP Response Example Source: https://www.domo.com/docs/portal/API-Reference/app-framework-apis/Workflows-API An example of a successful HTTP response when starting a workflow. It includes details about the workflow instance, such as its ID, status, and creation information. The 'status' property can be null, 'IN_PROGRESS', 'CANCELED', or 'COMPLETED'. ```json HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 { "id": "2052e10a-d142-4391-a731-2be1ab1c0188", // id of the workflow "modelId": "a8afdc89-9491-4ee4-b7c3-b9e9b86c0138", // id of the workflow instance "modelName": "AddTwoNumbers", // name of the workflow "modelVersion": "1.1.0", // workflow version number "createdBy": "8811501", // user id of workflow creator "createdOn": "2023-11-15T15:28:57.479Z", "updatedBy": "8811501", "updatedOn": "2023-11-15T15:28:57.479Z", "status": "null" } ``` -------------------------------- ### Install Domo Apps CLI Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-CLI Install the Domo Apps CLI globally using npm. This is the recommended installation method. ```bash npm install -g ryuu ``` -------------------------------- ### Install Domo Python SDK Source: https://www.domo.com/docs/portal/Getting-Started/sdks Install the pydomo library and its dependencies using pip. ```bash pip3 install pydomo requests jsonpickle ``` -------------------------------- ### NPM Installation and Import Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-js Install the ryuu.js package using npm. Import the SDK using ES modules or CommonJS syntax. ```bash npm install ryuu.js ``` ```javascript // ES modules import domo from 'ryuu.js'; // CommonJS const domo = require('ryuu.js').default; ``` -------------------------------- ### GitLab CI/CD Pipeline Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-CLI Set up a GitLab CI pipeline to deploy your Domo app. This example uses a Node.js Docker image to install the CLI, log in, and publish. Configure DOMO_INSTANCE and DOMO_TOKEN as protected CI/CD variables. ```yaml deploy: stage: deploy image: node:18 only: - main script: - npm install -g ryuu - domo login -i $DOMO_INSTANCE -t $DOMO_TOKEN - domo publish ``` -------------------------------- ### Start Local Development Server Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-CLI Initiate a local development server with live reload, app sizing, and data proxy features. Options can be specified to customize the development environment. ```bash domo dev [options] ``` -------------------------------- ### Get Start Date Source: https://www.domo.com/docs/portal/Connectors/Custom-Connectors/reference Retrieves the start date parameter configured for the connector. ```javascript var startDate = DOMO.getStartDate(metadata.parameters['Date']); ``` -------------------------------- ### Initialize Domo App Project Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tutorials/javascript/SugarForce Run this command in your terminal to set up a new Domo App project. Follow the prompts to name your app and select a starter kit. ```bash domo init ``` -------------------------------- ### Initialize New Custom App Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-CLI Create a new custom app project by running the `domo init` command. This command will prompt you for necessary details and create the project structure. ```bash domo init ``` -------------------------------- ### Get Current Time - CURTIME Source: https://www.domo.com/docs/s/article/360044289573 Returns the current time as a duration since the start of the day. For long-running jobs, this is the time the job started. ```sql CURTIME() ``` -------------------------------- ### Quick Start: Query Data and React to Filters Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-js Import the SDK and use it to query data by alias and listen for filter updates. Ensure the SDK is imported correctly for asynchronous operations. ```javascript import domo from 'ryuu.js'; // Query a dataset by its manifest alias const rows = await domo.data.query('sales'); // React to page filter changes domo.onFiltersUpdated((filters) => { console.log('Filters changed:', filters); loadData(); }); ``` -------------------------------- ### GET All Accounts Response Source: https://www.domo.com/docs/portal/17a8df3265783-data-accounts Example response for the 'Get All Accounts' request, showing a JSON array of account objects, each with an ID and display name. ```json HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 [ { "accountId": "{account_id}", "displayName": "Account 1" }, { "accountId": "{account_id}", "displayName": "Account 2" } ] ``` -------------------------------- ### Complete Custom App Example with Domo.js Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-js A comprehensive example demonstrating how to wire together data loading, event listeners for data and filter updates, variable handling, and user interactions like filtering and exporting within a Domo Custom App. ```javascript import domo from 'ryuu.js'; class SalesDashboard { constructor() { this.data = []; this.filters = []; this.initialize(); } async initialize() { this.setupEventListeners(); await this.loadData(); this.render(); } setupEventListeners() { domo.onDataUpdated((alias) => { console.log(`Dataset ${alias} updated`); this.loadData(); }); domo.onFiltersUpdated((filters) => { this.filters = filters; this.applyFilters(); }); domo.onVariablesUpdated((variables) => { this.updateTheme(variables); }); document.getElementById('filterBtn').addEventListener('click', () => { this.updateFilters(); }); document.getElementById('exportBtn').addEventListener('click', () => { this.exportData(); }); } async loadData() { try { const [sales, customers, products] = await domo.getAll([ '/data/v1/sales', '/data/v1/customers', '/data/v1/products', ]); this.data = { sales, customers, products }; this.render(); } catch (err) { console.error('Failed to load data:', err); this.showError('Unable to load dashboard data'); } } applyFilters() { const categoryFilter = this.filters.find(f => f.column === 'category'); const filtered = categoryFilter ? this.data.sales.filter(s => categoryFilter.values.includes(s.category)) : this.data.sales; this.renderSales(filtered); } updateFilters() { const selected = Array.from( document.querySelectorAll('.category-checkbox:checked') ).map(cb => cb.value); domo.requestFiltersUpdate([ { column: 'category', operator: 'IN', values: selected, dataType: 'STRING', }, ]); } async exportData() { const csv = await domo.get('/data/v1/sales', { format: 'csv' }); const blob = new Blob([csv], { type: 'text/csv' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'sales-export.csv'; a.click(); } } new SalesDashboard(); ``` -------------------------------- ### Get Access Token using cURL (Example) Source: https://www.domo.com/docs/portal/1845fc11bbe5d-api-authentication An example of requesting an access token with specific client credentials and scope. Ensure your credentials and scope are correctly formatted. ```curl curl -v -u 441e307a-b2a1-4a99-8561-174e5b153fsa:f103fc453d08bdh049edc9a1913e3f5266447a06d1d2751258c89771fbcc8087 "https://api.domo.com/oauth/token?grant_type=client_credentials&scope=data%20user" ``` -------------------------------- ### Create New Vue Project Source: https://www.domo.com/docs/portal/Apps/App-Framework/Quickstart/Starter-Kits Use Vue CLI to initialize a new Vue project. Navigate into the project directory afterward. ```bash vue init webpack my-app cd my-app ``` -------------------------------- ### Complete Example Manifest Source: https://www.domo.com/docs/portal/Apps/App-Framework/Guides/manifest This is a comprehensive example of a Domo app manifest file, showcasing various configurations for datasets, collections, workflows, and packages. ```json { "name": "My App Design", "version": "0.0.1", "fullpage": true, "size": { "width": 4, "height": 3 }, "datasetsMapping": [ { "alias": "sales", "dataSetId": "5168da8d-1c72-4e31-ba74-f609f73071dd", "fields": [ { "alias": "amount", "columnName": "Sales Amount" }, { "alias": "name", "columnName": "Client Name" }, { "alias": "startDate", "columnName": "Contract Initiation Date" } ] } ], "collections": [ { "name": "CommentsTable", "schema": { "columns": [ { "name": "user", "type": "STRING" }, { "name": "comment", "type": "STRING" } ] }, "syncEnabled": true }, { "name": "Users" } ], "workflowMapping": [ { "alias": "workflow1", "parameters": [ { "aliasedName": "num1", "type": "number", "list": false, "children": null }, { "aliasedName": "num2", "type": "number", "list": false, "children": null } ] }, { "alias": "workflow2", "parameters": [ { "aliasedName": "thing1", "type": "number", "list": false, "value": 2, "children": null }, { "aliasedName": "thing2", "type": "number", "list": false, "children": null } ] } ], "packageMapping": [ { "alias": "awesomeFunction", "parameters": [ { "alias": "number1AppInput", "type": "number", "nullable": false, "isList": false, "children": null }, { "alias": "number2AppInput", "type": "number", "nullable": false, "isList": false, "children": null } ], "output": { "alias": "sumAppOutput", "type": "number", "children": null } } ] } ``` -------------------------------- ### Calculate Percentage of Agents on Laptops Only in Beast Mode Source: https://www.domo.com/docs/s/article/360042925514 This Beast Mode calculation compares agents installed on all workstations against those installed on laptops only. It calculates a ratio and multiplies by 100 to get a percentage. ```Beast Mode (`count(case when `Device Type`='Laptop' then `OpenDNS` end)` / `count(case when `Device Type`='Laptop' then `System Name` end)`)*100 ``` -------------------------------- ### Install Basic React App with Domo Template Source: https://www.domo.com/docs/portal/Apps/App-Framework/Quickstart/Starter-Kits Use these commands to create a new React app with the `@domoinc/cra-template`. Replace `my-app` with your desired application name. ```bash yarn create react-app my-app --template @domoinc ``` ```bash npx create-react-app my-app --template @domoinc ``` ```bash npm init react-app my-app -- --template @domoinc ``` -------------------------------- ### Create a project Source: https://www.domo.com/docs/llms.txt Create a new project in your Domo instance. ```APIDOC ## Create a project ### Description Create a new project in your Domo instance. ### Method POST ### Endpoint /v1/projects ### Parameters #### Request Body - **name** (string) - Required - The name of the new project. - **description** (string) - Optional - A description for the project. ### Request Example ```json { "name": "New Project", "description": "This is a project for new initiatives." } ``` ### Response #### Success Response (200) - **id** (integer) - The ID of the newly created project. - **name** (string) - The name of the project. - **description** (string) - The description of the project. - **createdAt** (string) - The date and time the project was created. ### Response Example ```json { "id": 1, "name": "New Project", "description": "This is a project for new initiatives.", "createdAt": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Example Agent Instructions Source: https://www.domo.com/docs/s/article/000005853 These instructions define the behavior of the Example Agent, guiding it to answer analyst questions positively by querying relevant datasets and reviewing product release notes and previous responses. ```text You are responding to an industry analyst asking questions about Domo's functionality. 1) Answers should be positive and forward-thinking. 2) Query the Analyst Question dataset to acquire the questions. 3) Review Release Notes to add newly released functionality to the response. 4) Review previous responses for Gartner to help formulate the response. 5) Review previous responses for Forrester to help formulate the response. 6) Review previous responses for Ventana to help formulate the response. Question: "Formatting and layout functions, such as page-based layouting, print-oriented output as well as special features such as conditional display, etc." Answer: "Domo Dashboards and App Studio give users the flexibility to create custom-formatted, pixel-perfect layouts with drag-and-drop, slider, and interactive tools that preserve a consistent viewing experience of a single layout across all devices and mediums (including via web browser, email, print, and mobile app). Themes allow users to personalize their designs according to brand with custom colors, shapes, borders and charts that cater to unique data representation needs based on audience and objectives. When designing with a custom layout, creators can preview how an end-user will see their layout on a mobile device independently and customize how the layout appears on a mobile device with drag-and-drop tools to help create simplified and targeted experiences for mobile consumption. This allows creators to design with all viewers and viewing formats in mind. For additional control over pixel-perfect reports, the Domo App Dev Studio (SDK) also allows users to create any style of report layout needed with the full set of modern scripting control techniques (CSS, HTML, conditional/responsive code). Our Microsoft Office Add-ins directly integrate Domo into MS Office applications and provide the ability to create highly formatted and customized reports." Question: "Is data lineage supported by the solution?" Answer: "Yes. Absolutely! Domo's Data Lineage and Impact Analysis tool provides a comprehensive view of any dataset back to the source data acquisition. It provides a powerful visual overview of the path a dataset took to its immediate usage, making it easy to spot dependencies, identify where a change in the source data occurred, and what downstream datasets, visualizations, and reports may be affected." ${Target_Dataset} Answer format (in json format): { "Timestamp": "" # "Question": "" #, "Answer": "" #, "PreviousYearAnswer": "" # } Think about your response step by step. Output any thinking in XML tags. Convert the answers to a pipe-delimited string, then use that to write the answers to the 'Analyst Helper' dataset. ``` -------------------------------- ### DOMO.getStartDate Source: https://www.domo.com/docs/portal/Connectors/Custom-Connectors/reference Used to set the start date. ```APIDOC ## DOMO.getStartDate(dateParameter) ### Description Retrieves the start date value, typically from connector parameters. ### Parameters #### Path Parameters * **dateParameter** (any) - Required - The parameter representing the start date. ### Returns * **Date** (Date object) - The start date. ### Example ```javascript var startDate = DOMO.getStartDate(metadata.parameters['Date']); ``` ``` -------------------------------- ### Get Current Date - CURDATE Source: https://www.domo.com/docs/s/article/360044289573 Returns the current date. For long-running jobs, this is the date the job started. ```sql CURDATE() ``` -------------------------------- ### Workflow Metrics HTTP Request Source: https://www.domo.com/docs/portal/API-Reference/app-framework-apis/Workflows-API Example of an HTTP GET request to retrieve overall workflow metrics. This endpoint allows for filtering and pagination. ```http GET /domo/workflow/v1/models/{workflowAliasedName}/overall ``` -------------------------------- ### Display All Commands Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-CLI Use the `--help` flag with the `domo` command to view a complete list of available commands and their usage. ```bash domo --help ``` -------------------------------- ### GET Account by ID Response Source: https://www.domo.com/docs/portal/17a8df3265783-data-accounts Example response when successfully retrieving a Domo account. It includes the account's ID, display name, and status. ```json HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 { "accountId": "{account_id}", "displayName": "Account Display Name", "status": "Active" } ``` -------------------------------- ### Complete Row and Start New Row Source: https://www.domo.com/docs/portal/Connectors/Custom-Connectors/reference Indicates that a row of data is complete and prepares for a new row. This example demonstrates adding multiple columns and rows. ```javascript datagrid.addColumn('Name', datagrid.DATA_TYPE_STRING); datagrid.addColumn('Birthday', datagrid.DATA_TYPE_DATE); datagrid.addCell('Jane Jones'); datagrid.addCell('2017-10-25'); datagrid.endRow(); ``` -------------------------------- ### Get User Activity Logs Source: https://www.domo.com/docs/portal/b90c3866dbc26-activity-log-api Retrieves a list of user activity logs. Specify the start and end timestamps, and optionally set offset, limit, and object types for filtering. ```json { "method": "GET", "url": "https://{domo_instance}.domo.com/api/audit/v1/user-audits?start=1646434158639&end=1654206558639&offset=0&limit=300&objectType=DATAFLOW_TYPE,ACCOUNT", "headers": { "X-DOMO-Developer-Token": "", "Content-Type": "application/json" } } ``` -------------------------------- ### Initialize Git Repository Source: https://www.domo.com/docs/s/article/000005166 Create a new Git repository in the current directory. This prepares the directory for version control. ```bash git init ``` -------------------------------- ### Text Generation with System Message Source: https://www.domo.com/docs/portal/ffvznqc76b2b5-ai-services-api This example shows how to provide a system message to guide the model's behavior, in this case, to respond only in Japanese. A specific model is also selected. ```json { "method": "POST", "url": "https://{instance}.domo.com/api/ai/v1/text/generation", "headers": { "X-DOMO-Developer-Token": "", "Content-Type": "application/json" }, "body": { "input": "Why is the sky blue?", "system": "Respond only in Japanese", "model": "domo.domo_ai.domogpt-chat-small-v1:anthropic" } } ``` -------------------------------- ### Get File by Path using fetch Source: https://www.domo.com/docs/portal/API-Reference/app-framework-apis/Filesets-API Retrieves a file from a FileSet using its path. This example uses `fetch` and expects a JSON response. Ensure the `filesetId` and `filePath` are correctly provided. ```javascript fetch( `/domo/files/v1/filesets/${filesetId}/path?path=${encodeURIComponent( filePath, )}`, ) .then((response) => response.json()) .then((result) => console.log(result)) .catch((error) => console.error(`Error: ${error}`)); ``` -------------------------------- ### Get File by ID using fetch Source: https://www.domo.com/docs/portal/API-Reference/app-framework-apis/Filesets-API Retrieves a specific file from a FileSet using its ID. This example uses `fetch` and expects a JSON response. Ensure the `filesetId` and `fileId` are correctly provided. ```javascript fetch(`/domo/files/v1/filesets/${filesetId}/files/${fileId}`) .then((response) => response.json()) .then((result) => console.log(result)) .catch((error) => console.error(`Error: ${error}`)); ``` -------------------------------- ### Data Query Example Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tools/domo-js Demonstrates the correct way to query data using the static Domo class. Avoid instantiating the Domo class. ```javascript const rows = await domo.data.query('sales'); ``` -------------------------------- ### Basic App Structure in index.html Source: https://www.domo.com/docs/portal/Apps/App-Framework/Guides/handling-data-updates Set up the basic HTML structure for your Domo app, including links to stylesheets and scripts. This example includes placeholders for displaying total sales and the number of data fetches. ```html

Handling Data

Total Sales

$ 0

# Data Fetches

0
{/* domo.js optional utils */} ``` -------------------------------- ### Connect to Domo SFTP Server via Command Line Source: https://www.domo.com/docs/s/article/360042931914 Use this command to establish an SFTP connection to your Domo instance. Ensure you replace placeholders with your specific username, key file name, and Domo domain. ```bash sftp –i domosftpkey.pem username@mycompany.import.domo.com ``` -------------------------------- ### Search API Query Example Source: https://www.domo.com/docs/portal/fce416aea276f-search-product-api This example demonstrates how to construct a POST request to the search API to find dataflows. It includes common parameters like count, offset, query, and entityList. ```json { "method": "POST", "url": "https://{instance}.domo.com/api/search/v1/query", "headers": { "X-DOMO-Developer-Token": "", "Content-Type": "application/json" }, "body": { "count": 20, "offset": 0, "query": "", "filters": [], "sort": {}, "facetValuesToInclude": [], "facetValueLimit": 0, "facetValueOffset": 0, "includePhonetic": true, "entityList": [["dataflow"]] } } ``` -------------------------------- ### Get File Permissions HTTP GET Request Source: https://www.domo.com/docs/portal/API-Reference/app-framework-apis/Files-API HTTP GET request to fetch the permission settings for a given file. ```http GET /domo/data-files/v1/{dataFileId}/permissions HTTP/1.1 Accept: application/json ``` -------------------------------- ### Launch Domo App Development Server Source: https://www.domo.com/docs/portal/Apps/App-Framework/Tutorials/javascript/SugarForce Start a hot-reloading preview of your app. This command is useful for seeing code changes reflected in real-time during development. ```bash domo dev ``` -------------------------------- ### Install Third-Party R Library Source: https://www.domo.com/docs/s/article/7440921035671 Use this R/cran command to install a package when conda installation fails. Ensure you are in a workspace terminal. ```r install.packages("cluster") ``` -------------------------------- ### Install Third-Party Python Library Source: https://www.domo.com/docs/s/article/7440921035671 Use this pip command to install or upgrade a Python library when conda installation fails. Ensure you are in a workspace terminal. ```python pip install -U scikit-learn ```