Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omneo.io/llms.txt

Use this file to discover all available pages before exploring further.

The Omneo SDK (Shapes SDK) is a JavaScript library for building Omneo-powered experiences on websites and web applications. It provides authenticated profile access, pre-built UI components (Shapes), and low-level API methods.

Installation

<script src="https://cdn.getomneo.com/shapes/shapes.js"></script>
Or via npm:
npm install @omneo/shapes-sdk

Initialisation

The SDK requires an authenticated token. Obtain one via the Shopify Proxy, SFCC proxy, or your own authentication implementation.
var shapesClient = ShapesSDK.init({
  url: 'https://api.[tenant-handle].getomneo.com/id',
  token: '[omneo_id_token]',
  logging: true
})

Core methods

Once initialised, the SDK provides access to the authenticated profile:
// Get the current profile
shapesClient.getProfile().then(profile => {
  console.log(profile.first_name, profile.reward_balance);
});

// Update profile data
shapesClient.updateProfile({
  first_name: 'Jane',
  birth_day: 15,
  birth_month: 3
});

Shapes (pre-built components)

Shapes are embeddable UI components that surface Omneo data on the website. They are dropped into HTML with a simple script tag and configuration:
<div id="omneo-reward-balance"></div>
<script>
  ShapesSDK.shapes.rewardBalance({
    container: '#omneo-reward-balance',
    client: shapesClient
  });
</script>
Content needed: full SDK API reference, complete list of available Shapes, and authentication implementation examples for Shopify and SFCC.