Skip to main content

Configuration

The widget is configured through an options object passed to the constructor, or through a JSON data-config attribute on the mount element. When both are present, data-config values win.

let widget = new window.Sitata.claims(el, {
orgId: "<YOUR ORG ID>",
token: "<YOUR PUBLIC TOKEN>",
isB2B: true
});
widget.run();

Options

PropertyTypeDefaultDescription
orgIdStringโ€”Required. Your organization's identifier. The widget will not load without it.
tokenStringโ€”Required. Your organization's public authentication token. Sent as Authorization: PUB <token>.
apiBaseStringhttps://www.sitata.com/api/v2Override the REST API base URL.
isB2BBooleanfalseWhitelabel mode. When true, your branding is used and a "Powered by Sitata" footer is shown. When false, Sitata branding is used.
companyNameString"Sitata"Company name shown in the header and on the login screen.
logoUrlStringโ€”URL of your logo, shown in the header and login screen (whitelabel mode).
primaryColorString#1E88E5Primary theme color (hex).
accentColorString#FF8F00Accent/secondary theme color (hex).
hideHeaderBooleanfalseHide the widget's header bar so it nests inside your own page chrome. A simple inline "Back" control is used instead.
langStringautoForce the UI language (two-letter code, e.g. es). Otherwise a ?lang= URL parameter, then the browser language, then English is used.
userTokenStringโ€”A pre-authenticated token for the signed-in customer. When supplied and valid, the widget skips the PIN login entirely.
subscriptionIdStringโ€”Deep-link: on load, start a new claim under this subscription (policy), skipping the list and policy-selection step.
claimIdStringโ€”Deep-link: on load, open this specific existing claim's detail view.
socketUrlStringwss://sockets.sitata.com/socket/websocketWebSocket endpoint used for live support chat.
httpBaseStringhttps://www.sitata.comBase host used by supporting API helpers.
info

There is no separate currency option โ€” a claim's currency is taken from the policy (subscription) it belongs to.

Example

<div id="claims-app"></div>
<script>
window.document.addEventListener("sitata:claimsReady", function () {
var el = document.getElementById("claims-app");
var widget = new window.Sitata.claims(el, {
orgId: "0774f78c-56ff-47d8-989e-b050d72a2c7f",
token: "f7ed4b59-2981-499b-b33a-b09255cb950f",
isB2B: true,
companyName: "Air Advisor",
logoUrl: "https://airadvisor.com/logo.png",
primaryColor: "#f05800",
accentColor: "#f000e8",
hideHeader: true,
userToken: "THIS_CUSTOMERS_TOKEN",
subscriptionId: "THE_SUBSCRIPTION_ID"
});
widget.run();
});
</script>
<script async src="https://www.sitata.com/widgets/claims.js"></script>

Deep-Linking A Customer To A Claim

The widget scopes claims to a customer's subscriptions (policies). To send a specific customer straight to the right place, combine:

  1. orgId + token โ€” identify your organization.
  2. userToken โ€” pre-authenticate the customer so they skip login.
  3. Either subscriptionId (start a claim under that policy) or claimId (open an existing claim).

As a fallback, if the page's own URL path ends with a claim's UUID, the widget will detect it and open that claim. An explicit claimId takes precedence over the URL.

Events

The widget exposes a single lifecycle event:

EventDescription
sitata:claimsReadyFired on document once the widget bundle has loaded and is ready to be instantiated. Initialize the widget inside a listener for this event.
warning

The widget does not currently emit domain callbacks such as "claim submitted" or "status changed" to the host page โ€” its state stays inside the widget. If you need your portal to react to claim progress, drive it from the server-side claim webhooks (events 600โ€“607) instead.

Styling

Theming is driven by the primaryColor and accentColor options. The widget renders as a responsive, full-width application and inherits your page's font, so in most cases setting your brand colors, logoUrl, and hideHeader is all that is needed. The widget currently renders in a light theme.

Environments

The loader and widget bundle are served from Sitata's own domain:

EnvironmentLoader script
Productionhttps://www.sitata.com/widgets/claims.js
Staginghttps://staging.sitata.com/widgets/claims.staging.js

Point apiBase (and, if used, socketUrl) at the matching environment.