- Building generative AI features into your App
- Treating your App as a custom component in App Studio
- Next step ideas
Building generative AI features into your App
For our game night planning app, we’d like to be able to take a list of all the games that we own and ask an LLM to write a game night plan for us. To do that we’ll:
- Construct a prompt based on the games we own and send it to Domo’s Text Generation Service
- Add a new button that triggers a call to our plan generation function
- Display the response in our app
Generate a plan
First, we need to write a function that will take a list of games we already own, constructs a prompt, and sends that prompt to Domo’s AI Service Layer. Add this function to yourapp.js file:
Create a button
Add a container in our HTML where we can create our button.app.js under our other global variables.
createGenerateActionPlanButton we can use to dynamically insert our button element in the DOM.
Connect our button to generatePlan
This step will involve a few sub-steps.
-
Create two new global variables we can reference to hold the games we own and the game night plan. Place
var gamesOwned = []andvar gameNightPlan = "";below our other global variables at the top of theapp.jsfile. -
Update our
fetchDatafunction to filter our data downed to just the games we own, store that in thegamesOwnedvariable, and call thecreateGenerateActionPlanButtonfunction. -
Update our
createGenerateActionPlanButtonfunction to set up a callback to generate the plan when the user clicks the button.


gamesOwned won’t update when we edit our table.
One way to handle this is to fetch our data again on edit. You can add a call to fetchData at the bottom of your handleCellEdited callback function.
localStorage or frameworks like React that have tooling to efficiently handle updates to your app on state change. However, that is beyond the scope of this course, so we’ll just refetch all the data each time you make an update to ownership state.
Display the response from text generation service
The last thing we want to do is actually show the response after we click the button. Add a new div where we can display thegameNightPlan.
createGenerateActionPlanButton to add the gameNightPlan to our container:
generatePlan request.


Treating your App as a custom component in App Studio
One of the most powerful things about building Apps on the Domo platform is that you get to inherit all the great out-of-the-box functionality of Domo like filtering, standard Domo cards, PDP, etc. With App Studio, you can now build most of your App solution without any code and just focus your development time on the custom components. Let’s
domo publish our final app and then add it to an App Studio canvas.
Run domo publish for the final time today!
Next, navigate to App Studio - “Apps” in the top navbar.










- Add more filters to the current page.
- Create a new page or tabs on the current page to use more out-of-the-box charts for additional analytics on games
- Leverage game category or game designer data (may need to create Beast Modes or derivative DataSets to parse out individual values)
Next steps
Want to go beyond this training? Here are some ideas for expanding your App Development skills:
- Try adding integration with Workflows to send an email invitation to your friends. See our Guide on Hitting a Workflow from an App
- Try taking an action in a third party system. Refactor your app into a “Game Recommendation Application” and write a Code Engine function that add a Board Game you don’t already own to a shopping cart in an ecommerce site. See our Guide on Hitting Code Engine from an App
- Try building your application with more advanced tooling like our React Starter Kit.