Skip to main content
You have content within your product, even if you don’t think of it that way. Any database records that your Users would want to find is a piece of content, akin to a Google search result. Send this content to Chameleon and we will surface it to your Users in the Chameleon HelpBar. The content can be scoped to a specific Company, be pinned to the top when the HelpBar is opened and can perform any action from clicking an item..

See the specific APIs for more information on how to use Search your product.

To get HelpBar up and running, complete these items:

  1. Create a HelpBar, configure it with placeholder etc.
  2. Add your Help center as a SearchGroup.
  3. Add the top-level navigation within your product; First download this CSV template or example then Import it.
  4. [Optional] Add specific content from your database by creating a SearchItem per database record you want to be searchable.
  5. Publish your HelpBar by setting the published_at timestamp on the Search.
  6. Visit your product where Chameleon is installed and hit CMD + k (or how you configured key_meta and key_uid).
  7. Test a few search terms!

HelpBar REST API

With the Chameleon REST API for Search, you can:
  • Index custom content (the data from your product) into searchable SearchItems.
  • Import your product navigation to allow your Users to jump to a specific thing they are looking for with a SearchImport.
  • Configure SearchGroups to pull content from public sources (i.e. your Help center, Blog etc.).
  • Define a SearchLabelTheme to label your SearchItems for greater visibility.
  • Add labels to the title or description of SearchItems as SearchLabels.

Search bar Schema

Search is associated with groups: SearchGroups, and label_themes: SearchLabelThemes
PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
placeholderstringThe text used as the Search input placeholder
key_metabooleanFor the keyboard shortcut activation, is the CMD / CTRL key required to activate the HelpBar
key_uidstringFor the keyboard shortcut activation, the letter to be used in combination with key_meta to activate the HelpBar bar
title_recentstringThe label given to the group of “Recent items”
title_pinnedstringThe label given to the group of “Pinned items”
published_attimestampThe time this was most recently published
style_color_backgroundstringThe background color of this HelpBar
style_color_textstringThe font color of this HelpBar
style_item_color_highlightstringThe hover color of the items of HelpBar
style_item_border_highlightstringThe left-hand-side highlight color of the items of this HelpBar
url_group_idsarrayThe Environment that this is enabled to run on
published_updated_attimestampA copy of the Updated time (updated_at) when this was most recently published; used to track if an Experience is edited since last publish
published_user_idIDThe Chameleon ID of User who most recently published this
oidsnoneA set of pre-known IDs to directly add SearchItems to the default SearchGroups
label_themesarrayThe array of SearchLabelTheme models

SearchGroups Schema

PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
urlstringThe URL that this SearchGroup uses to fetch Search content
titlestringThe label given to this group in the HelpBar Search box
integrationstringThe backend search integration to search with (defaults to bing)
positionnumberThe order that these appear in lists (starting from 0)
last_test_attimestampAt the completion of a test of the configured URL, this value is set to the current timestamp.
iconobjectThe SearchIcon info to display for all results of this SearchGroup
icon.kindnoneThe “kind” of icon being used, one of uid or image
icon.uidnoneWhen using kind="uid", a specific Chameleon supplied svg-based icon [2]. One of: academic_cap, badge_check, beaker, bell, book_open, bulb, cake, calculator, calendar, chart_bar, chart_pie, chat_messages, chat_dots, chip, clipboard, clock, cloud_download, cloud, code, cog, color_swatch, connection, database, document_add, document_report, download, film, finger_print, fire, flag, folder, gift, globe, home, identification, key, leon, library, lightning_bolt, link, location_marker, map, microsurvey, music_note, paper_airplane, paper_clip, photograph, pop_out, presentation_chart, puzzle, qr_code, question_mark_circle, refresh, scale, search, segments, server, shield_check, sparkles, speakerphone, star, sun, support, table, tag, target, ticket, hammer, tooltip, signpost, truck, user_circle, user, users, variable, boards, grid, grid_add, list, warning, zoom_in, zoom_out, thumbs_up, thumbs_down, cube, company, click, hash, or toggle
icon.image_urlnoneWhen using kind="image", the url to an appropriate icon for this SearchGroup
icon.image_altnoneWhen using kind="image", the alt text for the icon
url_optionsobjectWhen configuring this SearchGroup for an Search integration, Chameleon will fetch some information about the given URL
url_options.integrationnoneThe detected integration of the URL; (intercom, zendesk, readme, etc.)
url_options.titlenoneThe title of the page loaded for URL
url_options.results_countnoneThe number of public search results for this URL (0-10)

SearchPage Schema

PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
namestringThe name given by an administrator of Chameleon
positionnumberThe order that these appear in lists (starting from 0)
url_match_allbooleanUrl match all
quantifier_urlsarrayList of URL matching conditions that must match the current page URL

SearchLabelTheme Schema

To reference a LabelTheme when adding title_labels or description_labels to SearchItems, use the id field returned in the label_themes wen listing the Search with GET /searches or Creating with POST /searches.
PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
namestringThe name given by an administrator of Chameleon
stylestringThe basic look of the label: One of: outline or filled
style_color_textstringThe text color as a hex code of a style=filled label, the text and outline of a style=outline label
style_color_backgroundstringThe background color as a hex code, of a style=filled label

List all HelpBars

There is only one per account.

HTTP Request

GET https://api.trychameleon.com/v3/edit/searches

HTTP Response

{
  "searches": [
    {
      "id": "6adae460426f060a00000000",
      "placeholder": "Search for help...",
      "key_meta": true,
      "key_uid": "k",
      ...
    }
  ]
}

Create or Update your HelpBar

There is only one per account so an update uses the same endpoint as create. Use any of the properties available in the schema

HTTP Request

POST https://api.trychameleon.com/v3/edit/searches
Examples
With a basic config activating with CMD + k (or CTRL + k).
{
  "placeholder": "Search for help...",
  "key_meta": true,
  "key_uid": "k",
  "title_recent": "Recently clicked",
  "title_pinned": "Pinned"
}
Add two search groups of all help-center content on help.your-product.com and of all of your posts to your blog at blog.your-product.com. Help center content defaults to the book_open icon and film for the blog content.
{
  "search_groups": [
    {
      "title": "Help center",
      "url": "https://help.your-product.com",
      "integration": "bing",
      "icon": {
        "kind": "uid",
        "uid": "book_open"
      }
    },
    {
      "title": "Best practices",
      "url": "https://blog.your-product.com",
      "integration": "bing",
      "icon": {
        "kind": "uid",
        "uid": "film"
      }
    }
  ]
}
Add a theme for filled-red labels, and one for filled green labels.
To reference a LabelTheme when adding title_labels or description_labels to SearchItems, use the id field returned with each theme.
{
  "label_themes": [
    {
      "style": "filled",
      "style_color_text": "FFF",
      "style_color_background": "FF6666"
    },
    {
      "style": "filled",
      "style_color_text": "FFF",
      "style_color_background": "66FF66"
    }
  ]
}
After you configure/update your HelpBar must publish it!
Publish by setting published_at to the current time. This makes your HelpBar available to your Users
{
  "published_at": "2029-04-07T12:18:00Z"
}

HTTP Response

{
  "search": {
    "id": "5f3c4232c712de665632a6d9",
    "placeholder": "Search for help...",
    "key_meta": true,
    "key_uid": "k",
    "title_pinned": "Recommended",
    "title_recent": "Recent",
    "published_at": "2029-04-07T12:18:00Z",
    "label_themes": [
      {
        "id": "6f3c4232c712de632a6d9656",
        "style": "filled",
        "style_color_text": "FFF",
        "style_color_background": "FF6666"
      },
      {
        "id": "62c73c423f12de632a6d96fa",
        "style": "filled",
        "style_color_text": "FFF",
        "style_color_background": "66FF66"
      }
    ]
  }
}

SearchItem Schema

A search item is a discrete unit of searchable content akin to a Google search result. You have content within your product, even if you don’t think of it that way. Any database records that your Users would want to find is a piece of content. Send us this content to surface it to your Users in the Chameleon HelpBar.
SearchItems are associated with actions: SearchActions, and title_labels / description_labels: SearchLabels
PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
uidstringThe external ID of the search content
titlestringThe display title
descriptionstringThe display description
pinned_attimestampOnly SearchItems with a timestamp here will show up in the “Pinned” / “Recommended” items search results group.
search_group_idstringThe SearchGroup that this SearchItem will display in.
profile_idsarrayThe IDs of the User Profile that has access to this SearchItem. Only members these specific User Profiles will be displayed this SearchItem as a search result
company_idsarrayThe IDs of the Company that has access to this SearchItem. Only members of this Company will be displayed this SearchItem as a search result
segment_idsarrayThe IDs of the Segment that has access to this SearchItem. Only current members of this Segment will be displayed this SearchItem as a search result
company_uidsarrayThe external ID (from in your database) for which Company has access to this SearchItem. Only members of this Company will be displayed this SearchItem as a search result
profile_uidsarrayThe external ID of the User Profile that has access to this SearchItem. Only members these specific User Profiles will be displayed this SearchItem as a search result
icon.kindstringThe “kind” of icon being used, one of uid or image
icon.uidstringWhen using kind="uid", a specific Chameleon supplied svg-based icon [2]. One of: academic_cap, badge_check, beaker, bell, book_open, bulb, cake, calculator, calendar, chart_bar, chart_pie, chat_messages, chat_dots, chip, clipboard, clock, cloud_download, cloud, code, cog, color_swatch, connection, database, document_add, document_report, download, film, finger_print, fire, flag, folder, gift, globe, home, identification, key, leon, library, lightning_bolt, link, location_marker, map, microsurvey, music_note, paper_airplane, paper_clip, photograph, pop_out, presentation_chart, puzzle, qr_code, question_mark_circle, refresh, scale, search, segments, server, shield_check, sparkles, speakerphone, star, sun, support, table, tag, target, ticket, hammer, tooltip, signpost, truck, user_circle, user, users, variable, boards, grid, grid_add, list, warning, zoom_in, zoom_out, thumbs_up, thumbs_down, cube, company, click, hash, or toggle
icon.image_urlstingWhen using kind="image", the url to an appropriate icon for this SearchGroup
icon.image_altstringWhen using kind="image", the alt text for the icon
actionsarrayAn array of the SearchAction that run when this SearchItem is clicked/selected in the HelpBar
title_labelsarrayAn array of the SearchLabel items displayed in the title of this SearchItem
description_labelsarrayAn array of the SearchLabel items displayed under the description of this SearchItem

SearchLabel Schema

PropertyTypeDescription
textstringThe display text of the label
theme_uidstringThe theme of this label, either the ID of a SearchLabelTheme configured on the Search, or a predefined theme: One of: filled_green, filled_blue, filled_yellow, filled_red, outline_green, outline_blue, outline_yellow, or outline_red

List all Search Items

SearchItems are for private content, and are added to Chameleon via CSV or directly via this REST API. They can be scoped on a per-company basis and there can be many thousands of custom search items, use the cursor to list as many as you need.
Note: this is how you iterate through all searchable content but it’s not how your Users search for this content, if you want to query your data like and end-user, feel free to Contact us to learn more.

HTTP Request

GET https://api.trychameleon.com/v3/edit/search_items
param-description
limitoptionalDefaults to 50 with a maximum of 500
beforeoptionalUsed when paginating, use directly from the cursor object from the previous response
beforeoptionalRead as “created before” and can be given as a timestamp to get only limit items that were created before this time
afteroptionalRead as “created after” and can be given as a timestamp or ID to get only limit items that were created after this time
search_import_idoptionalFetch only the SearchItems that were created (or updated most recently) by the given SearchImport.

HTTP Response

{
  "search_items": [
    {
      "id": "5f3c4232c712de665632a5f1",
      "title": "Data onboarding",
      "description": "The first step in making the switch is to import your first round of data.",
      ...
    },
    ... 48 more
    {
      "id": "5f3c4232c712de665632a5a2",
      "title": "Invite your team",
      "description": "Enable the rest of your team to collaborate, close items in your boards and see your workflows.",
      ...
    },
  ],
  "cursor": {
    "limit": 50,
    "before": "5f3c4232c712de665632a5f2"
  }
}

Create or Update your SearchItems

Use any of the properties available in the schema. You must either send a uid field (as the unique identifier for a piece of content) OR the Chameleon ID in the url path. Using the POST-based endpoint below and sending the required uid acts as a “create or update” (upsert). When content relates to a specific database item, include the database ID of that record in the uid

HTTP Request

With the parameter of uid; this endpoint will “create or update” (upsert) your content:
POST https://api.trychameleon.com/v3/edit/search_items
or if you have stored the SearchItem ID field from when you created it:
PATCH https://api.trychameleon.com/v3/edit/search_items/:id
Examples
Add a specific important action within your product for the Company in your DB with ID=14203, navigate to the onboarding page
{
  "uid": "data-onboarding",
  "title": "Data onboarding",
  "description": "The first step in making the switch is to import your first round of data.",
  "company_uids": ["14203"],
  "actions": [
    {
      "kind": "navigate",
      "url": "/data/import"
    }
  ]
}
Upsell with a search result, directly book a demo with Calendly
{
  "uid": "data-onboarding-book-demo",
  "title": "Data onboarding - see it in action",
  "description": "Book a demo with us to see the immediate value we can provide.",
  "actions": [
    {
      "kind": "calendly",
      "calendly_url": "https://calendly.com/your-company/sales-team-data-demo"
    }
  ]
}
Target content to a Chameleon Segment of Users
{
  "uid": "data-onboarding-admins-book-demo",
  "title": "Data onboarding - see it in action",
  "description": "Book a demo with us to see the immediate value we can provide.",
  "segment_ids": ["5f3c4232c712de665632a6d9"],
  "actions": [
    {
      "kind": "calendly",
      "calendly_url": "https://calendly.com/your-company/sales-team-data-demo"
    }
  ]
}
Target content to three Chameleon Companies — Only members of these companies will be able to search for this item. As parameters you can send either company_uids as the ID from your database or you can first lookup the Chameleon Companies and then send company_ids parameter.
{
  "uid": "data-example-multi-company-book-demo",
  "title": "Data onboarding - see it in action",
  "description": "Book a demo with us to see the immediate value we can provide.",
  "company_uids": ["44621", "93821", "1265"],
  "actions": [
    {
      "kind": "calendly",
      "calendly_url": "https://calendly.com/your-company/sales-team-data-demo"
    }
  ]
}
Target content to a Chameleon Company — Only members of this Company will be able to search for this item.
{
  "uid": "data-onboarding-admins-book-demo",
  "title": "Data onboarding - see it in action",
  "description": "Book a demo with us to see the immediate value we can provide.",
  "company_uids": ["93821"],
  "actions": [
    {
      "kind": "calendly",
      "calendly_url": "https://calendly.com/your-company/sales-team-data-demo"
    }
  ]
}
Target content to a Chameleon User Profile — Only this specific User will be able to search for this item.
{
  "uid": "data-onboarding-59324-book-demo",
  "title": "Data onboarding for {{first_name fallback='you'}} - see it in action",
  "description": "Book a demo with us to see the immediate value we can provide.",
  "profile_uids": ["59324"],
  "actions": [
    {
      "kind": "calendly",
      "calendly_url": "https://calendly.com/your-company/sales-team-data-demo"
    }
  ]
}
A hypothetical “car dealership” wants to make a used car searchable, track an event to all configured Integrations and open the listing in a new tab. It also includes a title label of NEW themed with an example theme from above.
{
  "uid": "cars:28192",
  "title": "2029 just off lease!!!",
  "description": "Come check this one out today, nice inside and out, 105kW battery, 6400 miles.",
  "actions": [
    {
      "kind": "event",
      "event_name": "Clicked Search => Car Listing"
    },
    {
      "kind": "url",
      "url": "https://my.cars.com/listings/2029-04/car/28192",
      "url_blank": true
    }
  ],
  "title_labels": [
    {
      "text": "NEW",
      "theme_uid": "62c73c423f12de632a6d96fa"
    }
  ]
}

Batch Update your SearchItems

POST https://api.trychameleon.com/v3/edit/search_items/batch
param-description
idsrequiredAn array of SearchItem IDs to update
*othersoptionalUse any of the properties available in the single SearchItem update
To update the icon of many items:
{
   "ids": [
     "6f3c42a6dd656232c712de63",
     "6f4c42a6d92f2c712d656e65",
     "6f5c42a6df232d656e2c7167"
   ],
   "icon": {
      "kind": "uid",
      "uid": "Puzzle"
   }
}
To update the SearchGroup of many items:
{
   "ids": [
     "6f3c42a6dd656232c712de63",
     "6f4c42a6d92f2c712d656e65",
     "6f5c42a6df232d656e2c7167"
   ],
   "search_group_id": "5f3c4232c712de665632a6d9"
}

Delete a SearchItems

Send the uid of a previously created SearchItem.

HTTP Request

DELETE https://api.trychameleon.com/v3/edit/search_items

Bulk Delete a SearchItems

Send the ids of a previously created SearchItem.

HTTP Request

DELETE https://api.trychameleon.com/v3/edit/search_items/batch
{
   "ids": [
     "6f3c42a6dd656232c712de63",
     "6f5c42a6df232d656e2c7167"
   ]
}

SearchAction Schema

A search action is one item in a collection of actions attached to a SearchItems. When the item is clicked the actions will be run in order (configure kind=navigate / kind=url last). Base schema
PropertyTypeDescription
updated_attimestampThe last time any property was updated
kindstringThe kind of action to take: One of: url, navigate, event, identify, tour, survey, script, function, airtable, calendly, chili_piper, figma, helpscout, hubspot_lists, intercom, link, livestorm, loom, pitch, typeform, or zendesk
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
*othersoptionalAny other integration specific configuration (more info below in the specific schemas)

Integration specific schemas

SearchAction with kind=url Schema

PropertyTypeDescription
kindstring”url” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
urlstringThe URL to use/open. Can be a full URL including https, or can be relative to the current page etc.)
url_blankstringIf the URL opens in a new tab (defaults to true)
{
   "kind": "url",
   "url": "https://help.your-product.com/posts/339201-learn-more-about-it"
}

SearchAction with kind=navigate Schema

PropertyTypeDescription
kindstring”navigate” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
urlstringThe URL to use/open. Can be a full URL including https, or can be relative to the current page etc.)
{
   "kind": "navigate",
   "url": "/cars/339201/edit"
}

SearchAction with kind=event Schema

Track an event to Chameleon and all of your configured integrations.
PropertyTypeDescription
kindstring”event” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
event_namestringThe name of the Event to track to your configured integrations
{
   "kind": "event",
   "event_name": "Search action taken (custom)"
}

SearchAction with kind=identify Schema

Send user data to Chameleon and all of your configured integrations.
PropertyTypeDescription
kindstring”identify” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
identify_keystringThe specific key to set to your configured integrations
identify_valuestringThe specific value to set to your configured integrations
{
   "kind": "identify",
   "identify_key": "opted_in_for_product_research",
   "identify_value": "true"
}

SearchAction with kind=tour Schema

Show a Chameleon Tour immediately (calls chmln.show with the configured tour_id). Quickly access this ID in the URL on the Chameleon dashboard. JavaScript API reference
PropertyTypeDescription
kindstring”tour” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
tour_idstringThe ID of the published Chameleon Tour to trigger
{
   "kind": "tour",
   "tour_id": "6f7dfada300116393481bbbb"
}

SearchAction with kind=survey Schema

Show a Chameleon Microsurvey immediately (calls chmln.show with the configured survey_id). Quickly access this ID in the URL on the Chameleon dashboard. JavaScript API reference
PropertyTypeDescription
kindstring”survey” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
survey_idstringThe ID of the published Chameleon Microsurvey to trigger
{
   "kind": "survey",
   "survey_id": "6d7dfad00116393ba481bb3c"
}

SearchAction with kind=script Schema

Run customized JavaScript when this item is clicked in the HelpBar. Check variables, user data, or page state before performing different actions.
PropertyTypeDescription
kindstring”script” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
scriptstringThe JavaScript string to evaluate
{
   "kind": "script",
   "script": "const pageStateDone = /#state=finished/.test(window.location.href);\nif(pageStateDone) { showFinishedModal() } else { showTodoModal() }"
}

SearchAction with kind=function Schema

After you have exposed a function on the window object within your application, call it when this item is clicked.
PropertyTypeDescription
kindstring”function” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
fnstringThe name of a function to call (without arguments (i.e. customChameleonFn_032)
{
   "kind": "function",
   "fn": "showCustomModal_chameleonAction_19"
}

SearchAction with kind=airtable Schema

Show an Airtable form directly in your product.
PropertyTypeDescription
kindstring”airtable” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "airtable",
   "href": "https://airtable.com/1AyOshrwxGUPn"
}

SearchAction with kind=arcade Schema

Launch an Arcade Demo in a full screen modal
PropertyTypeDescription
kindstring”arcade” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use (Arcade Share URL)
{
   "kind": "arcade",
   "href": "https://app.arcade.software/share/E4EoapWRfxxeN3nX1rRe"
}

SearchAction with kind=calendly Schema

Show a Calendly scheduling modal directly in your product.
PropertyTypeDescription
kindstring”calendly” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "calendly",
   "href": "https://calendly.com/chameleon/demo"
}
Merge tags are available for the href field; add the right Calendly link as User data and merge it in the action. (csm below refers to a customer success manager)
{
   "kind": "calendly",
   "href": "{{calendly_csm_url}}"
}

SearchAction with kind=chili_piper Schema

Show a ChiliPiper scheduling modal directly in your product.
PropertyTypeDescription
kindstring”chili_piper” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
selectedstringThe type of Experience to enable. One of: router or href
routerstringThe ChiliPiper Router name associated with this calendar
hrefstringThe URL to use
For a scheduling link
{
   "kind": "chili_piper",
   "selected": "href",
   "href": "https://chameleon.na.chilipiper.com/book/queuey-queue"
}
For a ChiliPiper router
{
   "kind": "chili_piper",
   "selected": "router",
   "router": "csm-router"
}
Merge tags are available for the href field; add the right Calendly link as User data and merge it in the action. (csm below refers to a customer success manager)
{
   "kind": "chili_piper",
   "selected": "href",
   "href": "https://chameleon.na.chilipiper.com/book/{{chilipiper_csm_queue}}"
}

SearchAction with kind=embed Schema

Launch any embeddable page in a full screen modal.
PropertyTypeDescription
kindstring”embed” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use (this URL needs to be a embeddable)
{
   "kind": "embed",
   "href": "https://content.acme.co/embeds/custom-widgets/23s2a"
}

SearchAction with kind=figma Schema

Show a Figma file or prototype directly in your product.
PropertyTypeDescription
kindstring”figma” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "figma",
   "href": "https://www.figma.com/file/QFEMdNRma0Y1WDcMRCw9Fz/Prototyping-in-Figma?node-id=0-1&t=YfflZMSK0tnWnCCu-0"
}

SearchAction with kind=google Schema

Show a Google Doc / Sheet / Form / Slides in a full screen modal.
PropertyTypeDescription
kindstring”google” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use (this Google doc needs to be “Published to Web” to be embeddable)
{
   "kind": "google",
   "href": "https://docs.google.com/document/d/e/2PACX-1vQ7tXBCx-9gAlzHvROHNGC1_cklni0CmbBPHk/pub"
}

SearchAction with kind=helpscout Schema

PropertyTypeDescription
kindstring”helpscout” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
helpscout_kindstringThe type of HelpScout Experience to enable. One of: open_chat, open_answers, search_term, or open_help_center
querystringThe search term to use for this action
article_urlstringThe specific URL / Help article to load
article_modestringWhere to display this article. One of: null, menu, or new_tab (defaults to null and opens in a HelpScout modal)
Open the Beacon to the default state
{
   "kind": "helpscout",
   "helpscout_kind": "open_chat"
}
Open HelpScout modal in your product to a specific article.
{
   "kind": "helpscout",
   "helpscout_kind": "open_help_center",
   "article_url": "https://help.your-product.com/article/596-billing-and-plans-guide"
}
Open the Beacon to a specific article.
{
   "kind": "helpscout",
   "helpscout_kind": "open_help_center",
   "article_url": "https://help.your-product.com/article/596-billing-and-plans-guide",
   "article_mode": "menu"
}
Open the Beacon to the answers tab
{
   "kind": "helpscout",
   "helpscout_kind": "open_answers"
}
Open the Beacon to a specific search query. Help users understand what is available in the help center
{
   "kind": "helpscout",
   "helpscout_kind": "search_term",
   "query": "Import data",
}

SearchAction with kind=hubspot_lists Schema

PropertyTypeDescription
kindstring”hubspot_lists” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "hubspot",
   "href": "https://meetings.hubspot.com/chameleon-sales/11-chat-30-minutes"
}

SearchAction with kind=intercom Schema

PropertyTypeDescription
kindstring”intercom” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
selectedstringThe type of Experience to enable. One of: open_chat, search_term, or open_help_center
messagestringA pre-filled message to provide a hint of the proposed message to your team
search_term_articlestringThe search term to use for this action
specific_articlestringThe specific URL / Help article to load
article_modestringWhere to display this article
{
   "kind": "intercom",
   "selected": "open_chat"
}
{
   "kind": "intercom",
   "selected": "open_help_center",
   "specific_article": "https://help.chameleon.io/en/collections/3572193-chameleon-101"
}

SearchAction with kind=livestorm Schema

Directly register a user for a webinar session; combine with a second action for kind=url that takes them to your “success” page.
PropertyTypeDescription
kindstring”livestorm” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
session_uidstringThe Livestorm Session ID copied from your Livestorm dashboard
utm_campaignstringThe UTM Campaign parameter for this Livestorm Session registration
utm_sourcestringThe UTM Source parameter for this Livestorm Session registration
utm_mediumstringThe UTM Medium parameter for this Livestorm Session registration
{
   "kind": "livestorm",
   "session_uid": "b820db33-3f2c-4159-a991-126fe03a7931",
   "utm_source": "chameleon_helpbar"
}

SearchAction with kind=loom Schema

Show a Loom video directly in your product.
PropertyTypeDescription
kindstring”loom” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "loom",
   "href": "https://www.loom.com/share/827d72cda9ed4724b30ba663f9ca00d3"
}

SearchAction with kind=navattic Schema

Launch an Navattic Demo in a full screen modal.
PropertyTypeDescription
kindstring”navattic” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "navattic",
   "href": "https://capture.navattic.com/cl4r18309ml5cngqz3e4fu84k"
}

SearchAction with kind=pitch Schema

Show a Pitch presentation directly in your product.
PropertyTypeDescription
kindstring”pitch” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
{
   "kind": "pitch",
   "href": "https://pitch.com/public/23e42e85-8142-4401-814e-509b597f06b0"
}

SearchAction with kind=typeform Schema

Show a Typeform survey directly in your product.
PropertyTypeDescription
kindstring”typeform” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
hrefstringThe URL to use
modestringThe Typeform display mode for this survey. One of: popup, drawer_left, drawer_right, or popover
{
   "kind": "typeform",
   "href": "https://trychameleon.typeform.com/to/ahn7QkmE#source=developer_docs",
   "mode": "popup"
}

SearchAction with kind=zendesk Schema

PropertyTypeDescription
kindstring”zendesk” (required)
helpbar_statestringIf the HelpBar stays open or closes when taking this action (optional defaults to null): One of: open
selectedstringThe type of Experience to enable. One of: open_chat, search_term, or open_help_center
search_term_articlestringThe search term to use for this action
specific_articlestringThe specific URL / Help article to load
Open the window.zE chat window
{
   "kind": "zendesk",
   "selected": "open_chat"
}
Search your Zendesk help center for the given search term
{
   "kind": "zendesk",
   "selected": "search_term",
   "search_term_article": "Import data"
}

Search JavaScript API

At a high level, Chameleon uses the chmln object on the page via chmln.on to allow you to control the HelpBar experience. All of these event listeners are optional. See the Type definitions below ↓
Recommended

chmln.on('app:navigate', (opts: NavigateOpts) => {
  /*
  Nagivate with React router / Vue router / pushState / call window.open / etc.

  Frameworks:
    - React info here => https://www.npmjs.com/package/@chamaeleonidae/chmln
    - Add more frameworks with a PR to this file and receive a $50 gift card

  opts.to is the `url` from the SearchAction; this SearchAction is configured with `kind=navigate`

  */
});
Optional

chmln.on('helpbar:search:content', (opts: SearchOpts, ctx: Context) => {
  /*
  Optional for User generated content search:
    - Generally Chameleon will handle search for you
    - If you need to add custom "Search" logic use this event to pass back the right items, two options:
      - directly return an array<SearchGroup>; include and `id`, `title`, and `search_items` keys for each SearchGroup
      - return a Promise that will resolve with the first argument being an array<SearchGroup>.
    - Best used when you already use Algolia or have a custom search endpoint internally

  Called when:
    - The User has entered in a query; when a user enters text and pauses

   return array<SearchGroup>
   return Promise that resolves with the first argument as array<SearchGroup>
   return null (or don't implement) to use the search results as pulled from Chameleon

   opts.query is the search term queried for

   */
});

chmln.on('helpbar:search:external', (opts: SearchOpts, ctx: Context) => {
  /*
  Optional for Help center search:
    - Generally Chameleon will handle search for you
    - If you need to add custom "Help center search" logic use this event to pass back the right items, two options:
      - directly return an array<SearchGroup>; include and `id`, `title`, and `search_items` keys for each SearchGroup
      - return a Promise that will resolve with the first argument being an array<SearchGroup>.
    - Best used when you use a Help center that Chameleon does not integrate with

  Called when:
    - The User has entered in a query; when a user enters text and pauses

   return array<SearchGroup>
   return Promise that resolves with the first argument as array<SearchGroup>
   return null (or don't implement) to use the search results as pulled from Chameleon

   opts.query is the search term queried for

   */
});

chmln.on('helpbar:search:question', (opts: QuestionOpts, ctx: Context) => {
   /*
    Optional for AI answering
      - Generally Chameleon will handle AI answering for you
      - If you need to provide an answer from your own API or own model

    opts.query is the question
    opts.searchGroups the currently displayed groups + results
    opts.onAnswer a function to call when you have the partial or complete answer

    This is where you would make our network request and then call onAnswer when ready

    Example use of onAnswer
      When the endpoint returns the full answer
        - opts.onAnswer({ text: 'To start using the data import...' });

      When the endpoint returns the full answer + reference material
        - opts.onAnswer({ text: 'To start using the data import...', links: [{ text: 'Data importing guide', href: 'https://help.acme.io/en/394821' }} });

      When the endpoint steams the answer in character, token, word, or sentence call multiple times with each part received
        the onAnswer callback will concatenate these parts together as they come in
        - opts.onAnswer({ text: 'To star' });
        - opts.onAnswer({ text: 't using the' });
        - opts.onAnswer({ text: ' data import feature, first' });
    */
});

chmln.on('helpbar:search:answer', (opts: AnswerOpts, ctx: Context) => {
  /*
  Optional for tracking AI Answering
    - Know when an answer is generated including the question and answer

   opts.query is the question
   opts.answer is the AI generated answer

   */
});

chmln.on('helpbar:opened', (opts: BlankOpts, ctx: Context) => {
  /*
  Optional:
    - This is purely informational but can be used for custom tracking etc.

  Called when:
    - The HelpBar is triggerd (opened by the User)

  ctx.source will tell you how it was opened

  */
});

chmln.on('helpbar:closed', (opts: BlankOpts, ctx: Context) => {
  /*
  Optional:
    - This is purely informational but can be used for custom tracking etc.

  Called when:
    - The HelpBar is closed by the User

  */
});

chmln.on('helpbar:items:recent', (opts: RecentOpts, ctx: Context) => {
  /*
  Optional:
    - Chameleon will handle recent items for you
    - If you need to add custom "Recent items" logic use this event to pass back the right items

  Called when:
    - the HelpBar needs a list of the most recent actions taken

  return Array or Promise of recent actions taken
  return null (or don't implement) to use the recent items as tracked by Chameleon

  opts.items is an array<SearchItem>; the 4 most recent actions taken

  */
});

chmln.on('helpbar:items:pinned', (opts: BlankOpts, ctx: Context) => {
  /*
  Optional:
    - Chameleon will handle pinned items for you
    - If you need to add custom "Suggestion items" logic use this event to pass back the right items

  Called when:
    - the HelpBar needs a list of the pinned items

  return Array or Promise of pinned items to display
  return null (or don't implement) to use the pinned items as added to Chameleon backend via SearchItem

  */
});

chmln.on('helpbar:search:items', (opts: SearchItemsOpts, ctx: Context) => {
  /*
   Optional:
     - This is purely informational but can be used for custom tracking etc.

   Called when:
     - The Search query finished with 1 or more search results

   opts.query is the search term queried for
   opts.items an array<SearchItem> of all search results for this query
      - opts.items.length will equal 0 when no results were returned

  */
});

chmln.on('helpbar:item:action', (opts: ActionOpts, ctx: Context) => {
  /*
  Optional:
    - Chameleon performs the configured actions automatically in the order they are defined in.
    - If you need to know when a specific "SearchItem" is clicked/triggered, use this event to know

  Called when:
    - When the SearchItem is clicked/triggered/selected and its actions are about to run

  opts.item is a SearchItem
  opts.item.actions is the array<SearchAction> that will be run

  */
});

chmln.on('helpbar:item:action:error', (opts: ActionErrorOpts, ctx: Context) => {
  /*
  Optional:
    - Chameleon may encounter an error when triggering an action.

  Called when:
    - When an action encounters an error

  opts.item is a SearchItem
  opts.action is a SearchAction that errored

  */
});

JS API type definitions

Limits

When these limits are exceeded, the endpoints will return a status code 409 with a descriptive error message please Contact us with any questions.
  1. Each SearchItem can be targeted to one or many Company, Segment, or Profiles.
    1. An Free/Startup account is limited to 10 per SearchItem and in aggregate across all SearchItems.
    2. A Growth/Enterprise account is limited to 30 per SearchItem and in aggregate across all SearchItems..
  2. Each SearchGroup can be targeted to one or many Company or Segment.
    1. An Free/Startup account is limited to 10 in use across all SearchGroups and in aggregate across all SearchGroups.
    2. A Growth/Enterprise account is limited to 30 in use across all SearchGroups and in aggregate across all SearchGroups.
  3. Each HelpBar can have many groups (SearchGroup) and each can be targeted to one or many Segments.
    1. An Free/Startup account is limited to 20 SearchGroups.
    2. A Growth/Enterprise account is limited to 100 SearchGroups.

Search Item Importing via CSV (SearchImport)

PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
fileFileThe file to import, please use the template to make this easier.
filenamestringThe name of the original file uploaded
search_group_idstringThe SearchGroup that all of the resulting SearchItems will display in. (and/or this can be customized per row with “HelpBar Group ID” column)
head_columnsarrayA list representing the parsed version of the first 5 lines. Each object has a header column name and values are an ordered array of the next 4 rows for that column
statsobjectThe details of the data itself and of the last run of this SearchImport.
stats.rows_countnumberThe number of rows in the file
stats.last_rownumberThe row number of the most recent processed row (used for mid-import progress bar)
stats.last_import_statestringThe current state of the import
stats.last_import_errorstringA representation of the error the last import encountered
stats.last_import_attimestampThe last time this import was run
stats.last_import_elapsednumberThe total time (in seconds) that the import took.
stats.created_countnumberThe number of records created by this Import
stats.updated_countnumberThe number of records updated by this Import
stats.deleted_countnumberThe number of records removed by this Import

Create a Search Import

Use Content-Type: multipart/form-data to create an Import in one request, include the file parameter with a CSV based on the template.

HTTP Request

POST https://api.trychameleon.com/v3/edit/search_imports

Get a Search Import

Useful to track the progress of this import. Small imports (< 100 rows) will finish within approx 1 second.

HTTP Request

GET https://api.trychameleon.com/v3/edit/search_imports/:id

Trigger HelpBar

This command triggers the display of the HelpBar. You can also use variations of this command with options to prefill a query or specify a custom placeholder, enhancing the user experience and engagement with the HelpBar.
chmln.show('helpbar')
This variation of the command allows for additional customization by accepting options. The query option enables the prefilling of a query within the HelpBar, serving as a starting point for user inquiries. Additionally, you can specify a custom placeholder using the placeholder option to provide users with a helpful prompt.
chmln.show('helpbar', options)

Options:

  • query (optional): Specifies a pre-filled query string to assist users in formulating their inquiries. If pre-filled as a question, it will also trigger the AI to generate an answer.
  • placeholder (optional): Sets a custom placeholder text within the HelpBar, guiding users on what they can search for or ask.

Examples:

  • Prefill query
chmln.show('helpbar', { query: 'annual billing' })
  • When pre-filled as a question, this will trigger the AI to provide an asnwer.
chmln.show('helpbar', { query: 'What is a tour?' })
  • Specify placeholder text:
chmln.show('helpbar', { placeholder: 'Search for it...' })