Create a ChatGPT app

This guide explains ChatGPT app architecture. It also provides a no-code process to set up and chat with a Discovery quick-start app in ChatGPT's developer mode.

Discovery quick-start app in ChatGPT

Discovery quick-start app in ChatGPT

Prerequisites

Before you start, you need:

  • Bloomreach Discovery account: Account credentials (account_id and domain_key) of an active Discovery account.
  • Bloomreach MCP key: Contact the Bloomreach Labs team ([email protected]) to request a new MCP key. Required to authenticate the Loomi Connect MCP server.
  • Discovery Search API knowledge: Familiarity with the Bloomreach Discovery Product and Category Search API.

If you want to implement your own ChatGPT app, it would additionally require:

  • Any paid ChatGPT plan: Required to test apps in ChatGPT's developer mode.
  • Development environment: Node.js 20+, and pnpm/npm/yarn for ChatGPT app development [not required for quick-start app].

📘

Note

Enhance your ChatGPT app with Engagement integration: Work with our team to enable Bloomreach Engagement in your ChatGPT app. This integration enables event tracking from the ChatGPT channel and allows you to target shoppers with personalized weblayers based on their conversational interactions.

Create a new soft ID on your Engagement dashboard to track events from ChatGPT, and integrate the ID into your website.

Architecture overview

A ChatGPT app with Discovery uses a three-tier architecture where the Loomi Connect MCP server works as middleware between ChatGPT and Bloomreach Discovery:

Data flow

  1. Shopper adds your app: User connects your app to enhance their ChatGPT conversation.
  2. Shopper asks a question: User has a natural conversation with ChatGPT about products.
  3. ChatGPT interprets intent: ChatGPT extracts key information and decides to call your app's MCP tools.
  4. MCP server translates: The MCP server converts the natural language into Discovery API parameters.
  5. Discovery API returns results: Bloomreach Discovery searches your catalog with structured parameters.
  6. MCP server formats response: Server transforms Discovery results for ChatGPT.
  7. ChatGPT delivers search results: Product data from the MCP server is sent to your app for processing.
  8. App displays products: Your app receives the data and renders the product results for users.
Loomi Connect architecture overview

Loomi Connect architecture overview

Key components

To learn about the configuration and file structure of a ChatGPT app project, refer to the OpenAI Apps SDK examples repository on GitHub.

Given below are the key components of an app created through Loomi Connect:

  • ChatGPT app: Handles user conversation and interface.
  • MCP server: Translates between ChatGPT and Discovery, maintains session context.
  • Discovery APIs: Provide product search, filtering, ranking, and Discovery’s tracking capabilities.
  • Product catalog: Your ecommerce product data indexed in Bloomreach Discovery.

Set up a Discovery quick-start app

The quick-start app connects ChatGPT to Bloomreach Discovery, enabling conversational product and category searches with merchandising capabilities. Results display in an interactive carousel within the ChatGPT interface.

Conversation with the ChatGPT app

Search results carousel in ChatGPT

Loomi Connect MCP provides a search-carousel tool that renders interactive search results in ChatGPT apps. Follow the instructions below to create a new app connected to the MCP server using your Discovery credentials.

🚧

Important

The search results carousel doesn't appear in the OpenAI Platform chat interface since these visual components are only supported in ChatGPT apps. Use Loomi Connect MCP in OpenAI Platform to build agents and test text-based conversation flows.

Build your own carousel components to display product results in your custom chat application.

Create the app in developer mode

Developer mode lets you create unpublished custom apps in ChatGPT.

🚧

Important

You need a paid ChatGPT plan to create or test apps in developer mode.

Go to the ChatGPT interface to set up a new test app:

  1. Go to Settings > Apps > Advanced Settings and toggle ON Developer mode

  2. Click Create app and configure your app with the values given below.

    New app configuration

    New app configuration

    1. Name: The name of the app for ChatGPT's context.
    2. MCP Server URL: Loomi Connect MCP server URL (https://mcp.bloomreach.com/<account_id>/<domain_key>/<x-api-key>/mcp/). Replace the placeholders with the Loomi Connect MCP authentication credentials.
    3. Authentication: Select No Auth because the MCP server authenticates the requests using your Discovery credentials.
    4. Configure the optional, Icon image and Description for the app.
  3. Review the data sharing risk disclosure and click Create.

  4. After connecting successfully, your app appears under Enabled apps and becomes available for use in chat. Click the app name to view its details and available actions.

Test the integration

Add your app as a context source to use it in conversations with ChatGPT. Connect the app in the chat by typing its name prefixed with / or @. For example, /Pacific Apparel.

Alternatively, click the + menu and select your app under Developer mode.

App connected in chat

App connected in chat

The app's name and icon indicate its availability in chat. ChatGPT automatically calls the app when relevant to the conversation. Refer to the OpenAI documentation for more details on how you can use the app in conversations.

Watch this short video that demonstrates the process to connect and use the Discovery quick-start app:

Use the following test scenarios to validate that ChatGPT calls your tool and returns relevant results.

Test basic search 

Try simple queries to confirm the basics work:

  • Simple product queries: "Show me laptops"

  • Category browsing: "What toys do you have?"

  • Brand searches: "Find Nike shoes"

📘

Note

Beyond the basic search functionality, we can configure additional features based on your needs. For example, B2B customers might want to use the MCP server directly in their own applications without ChatGPT integration, or you might need category browsing capabilities in addition to product search.

Test conversational filtering

Check how the app handles natural conversation patterns:

  • Progressive refinement: Start broad, then narrow with follow-up questions

  • Multi-criteria search: "Red dress under $100 for a wedding"

  • Contextual understanding: "Show me more like the second one"

Test targeted merchandising

Test targeted merchandising experiences specifically created for ChatGPT users shopping through your conversational AI channel. The process involves:

  1. Creating an MCP-specific merchandising audience in Bloomreach Discovery to identify traffic originating from ChatGPT (URL contains mcp or mcp.bloomreach.com).

  2. Configuring merchandising rules that target this audience, allowing you to boost specific products or customize the shopping experience differently from your standard website. Enable broad match on the rule, as the input to the MCP tool (q) can vary significantly from the search term set in the rule.

  3. Testing the implementation by running searches in ChatGPT and verifying that the merchandising rules display different results from the website.

Test edge cases

Confirm the app handles unusual scenarios gracefully:

  • No results found: Verify the app suggests alternatives when searches return nothing.

  • Ambiguous queries: Try "Find something nice" to check how the app responds

  • Multiple interpretations: Test "Apple products" to confirm the app handles both fruit and electronics appropriately.

Build your own app

You can develop your own ChatGPT app using the OpenAI Apps SDK. Use OpenAI's example app implementation repository as a starting template. The src/ folder contains the components and logic needed to call the MCP server and handle responses.

Integrate Loomi Connect MCP into your custom app to leverage Discovery's rich behavioral data and search capabilities.

📘

Note

Currently, we provide the search-carousel tool according to the defined specification. Additional tooling features may be added during the beta phase.
To use your custom-built assets, contact our team with your asset URLs and we'll update your configuration accordingly.

For deployment, see the OpenAI documentation to deploy and submit your app to the ChatGPT Apps Directory.