For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
guide

Build an OEWS market data solution

Pull BLS wage statistics into Rippling with custom settings, functions, custom objects, and a custom app.

Use with AI:Rippling AI ChatGPT Claude Cursor

Overview​

This guide shows you how to store Occupational Employment and Wage Statistics (OEWS) from the U.S. Bureau of Labor Statistics (BLS) in Rippling. You save a registration key and series IDs, a function calls the BLS timeseries API, and Rippling keeps both the wage snapshots and every ingest attempt.

The OEWS package installs the working app, including a Software Developer wage series. Use it to load that series, then read the source and point the same pattern at another dataset.

When to use this solution​

Use this approach when market wage data should live in Rippling and you want to:

  • Pull a chosen set of BLS series on demand.
  • Keep wage observations separate from the history of each pull.
  • Review the latest snapshots and ingest results in one app.

What you'll build​

  • Custom settings that store the BLS key as a secret and the series list as configuration.
  • An SDUI function that renders settings, refresh controls, recent snapshots, and ingest results.
  • An async function that calls BLS, normalizes the response, and upserts records.
  • Allowed domains that restrict outbound requests to api.bls.gov.
  • Custom objects that store market snapshots and ingest history.
  • Validations that reject inconsistent successful snapshots and malformed metro area codes.
  • Rules that default new snapshot and ingest statuses.
  • A custom app that combines configuration, data, and operational history.

Architecture​

  1. Install the package so the settings, objects, functions, and app land together.
  2. Save a BLS registration key and up to 50 series IDs.
  3. Refresh market data. The function calls api.bls.gov, groups related wage measures into one snapshot, and writes an ingest run.
  4. Review OEWS Snapshots and Ingest Runs in the app.

Figure 1: A saved BLS key and series list call api.bls.gov, then land as snapshot rows and an ingest run.

Requirements​

Before you begin, you need:

  • Rippling products: Custom Objects, Custom Apps, Functions, and Custom Settings.
  • A test company where you can install a developer package.
  • A BLS registration key from the BLS Public Data API. The public API allows calls without a key at a lower limit. This package expects a key.
  • Outbound access from the pull function to api.bls.gov only. The package sets that allowed domain.

The settings page stores the key as a secret and does not read it back after you save it. The pull runs as the signed-in user. You do not create a separate Rippling API token for this package.


Install the package​

Example package

This package is designed for learning and demonstrations. Review the BLS API terms, rate limits, source series, data freshness, permissions, and error handling before adapting it for production use.

  1. Open the OEWS Market Data package.
  2. Review the included components.
  3. Complete the installation in a test company.
  4. Open OEWS Market Data from the Rippling sidebar.

Save the BLS settings​

Register through the BLS Public Data API, then enter the key on the package settings page.

Display nameInput typeValue
BLS registration keySecretRegistration key from BLS
OEWS series IDsStringUp to 50 series IDs, 25 characters each

Review the default series​

The package starts with 20 series for Software Developers (SOC 15-1252). Each location requests annual p25, median, p75, and employment.

AreaArea codeMeasures
San Francisco0041860p25, median, p75, employment
New York0035620p25, median, p75, employment
Seattle0042660p25, median, p75, employment
Austin0012420p25, median, p75, employment
Charlotte0016740p25, median, p75, employment

The settings page supplies the same full series IDs used by the demo package:

OEUM004186000000015125212, OEUM004186000000015125213,
OEUM004186000000015125214, OEUM004186000000015125201,
OEUM003562000000015125212, OEUM003562000000015125213,
OEUM003562000000015125214, OEUM003562000000015125201,
OEUM004266000000015125212, OEUM004266000000015125213,
OEUM004266000000015125214, OEUM004266000000015125201,
OEUM001242000000015125212, OEUM001242000000015125213,
OEUM001242000000015125214, OEUM001242000000015125201,
OEUM001674000000015125212, OEUM001674000000015125213,
OEUM001674000000015125214, OEUM001674000000015125201

Save and refresh​

  1. Enter the BLS registration key.
  2. Keep the default series, or replace them with up to 50 valid 25-character series IDs.
  3. Save the settings.
  4. Select Refresh market data.
  5. Wait for the async function to finish, then reload the results.
  6. Review OEWS Snapshots and Ingest Runs.

A second refresh updates the same snapshots. It does not create a duplicate row for a series you already stored.


Read the stored records​

Each snapshot is one market cell for an occupation, area, industry, and survey year. Ingest history stays on its own object so a failed pull does not become a wage row.

OEWS Snapshot​

Field nameAPI nameField typeData typeDescription
Series IDseries_id__cBasicTextRepresentative BLS series ID for this snapshot
SOC codesoc_code__cBasicTextOccupation code parsed from the series ID
NAICS codenaics_code__cBasicTextIndustry code parsed from the series ID
Area typearea_type__cBasicChoiceNational (N), state (S), or metro (M)
Area codearea_code__cBasicTextGeographic code parsed from the series ID
Area labelarea_label__cBasicTextReadable area name
Survey yearsurvey_year__cBasicDateSurvey year, stored as May 1 of that year
P25 annualp25_annual__cBasicCurrency25th-percentile annual wage
Median annualmedian_annual__cBasicCurrencyMedian annual wage
P75 annualp75_annual__cBasicCurrency75th-percentile annual wage
Mean annualmean_annual__cBasicCurrencyMean annual wage, when requested
Employmentemployment__cBasicNumberEmployment estimate, when requested
Footnotefootnote__cBasicLong textBLS footnote or suppression note
Sync statussync_status__cBasicChoiceOK, SUPPRESSED, or ERROR
Synced atsynced_at__cBasicDate timeWhen this snapshot was last written

A snapshot can be OK only when it stores a p25, median, or p75 wage. Metro area codes must be 7 characters.

Ingest Run​

Field nameAPI nameField typeData typeDescription
Statusstatus__cBasicChoiceRUNNING, OK, or ERROR
Series requestedseries_requested__cBasicLong textSeries IDs submitted to BLS
BLS messagebls_message__cBasicLong textResponse or failure detail, with the API key removed
Records upsertedrecords_upserted__cBasicNumberSnapshot rows written by this pull
Started atstarted_at__cBasicDate timeWhen the pull started
Finished atfinished_at__cBasicDate timeWhen the pull finished

New snapshots default to SUPPRESSED until a pull writes OK or ERROR. New ingest runs default to RUNNING.


Explore the source​

The public sample is a sanitized copy of the package source. Internal logging utilities and internal-only references have been removed.

Package manifest​

pull_oews_snapshots is async, can run for up to 15 minutes, and can call only api.bls.gov. The manifest also defines layouts, list views, validations, defaulting rules, search fields, and the custom app.

View the full OEWS package manifest

The pull function is async, can run for up to 15 minutes, and can only call BLS:

new ManifestFunction(manifest, {
apiName: 'pull_oews_snapshots',
name: 'Pull OEWS snapshots',
code: readFunction('pull_oews_snapshots'),
dependencies: { '@rippling/rippling-sdk': '0.2.0-alpha.85' },
deploymentOptions: { lambda_timeout_sec: 900 },
allowedDomains: ['api.bls.gov'],
isAsync: true,
});

The manifest also defines record layouts, public list views, validation rules, defaulting rules, search fields, and the three-page custom app.

Settings page function​

View the full OEWS settings function

The settings function:

  • Uses a password input for the BLS key
  • Validates the count and length of series IDs
  • Stores the key with the SECRET data type
  • Stores the normalized series list as a string
  • Invokes the async pull function from the same page
  • Shows recent snapshots and ingest runs
await saveSetting(
writer,
settings,
keyApiName,
'BLS registration key',
'SECRET',
apiKey,
);

Managed installations namespace custom settings just like other package components. The function derives the prefix from its installed function API name before reading or writing settings.

Ingest function​

View the full OEWS ingest function

The function posts the configured series to the BLS API:

const blsHttpResponse = await fetch(BLS_TIMESERIES_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
seriesid: seriesIds,
registrationkey: blsApiKey,
}),
});

It then parses every 25-character series ID into area, industry, occupation, and measure segments. Related measures are grouped into one snapshot before the record is upserted by its stable name.

The function also protects the API key when handling BLS errors. BLS can echo an invalid key in its response, so persisted messages pass through a redaction step before they are written to the ingest history.


Test the complete flow​

  1. Save a valid BLS key and the default series.
  2. Run Refresh market data.
  3. Confirm the snapshots for the default locations are created.
  4. Confirm the ingest run status is OK and Records upserted matches the rows written.

Test the full path​

  1. Run the refresh again.
  2. Confirm the existing snapshots update and no duplicate market cell appears.
  3. Save an invalid key, run the refresh, and confirm the ingest run is ERROR.
  4. Open the BLS message and confirm the key is not stored.
  5. Restore the valid key and confirm the next run succeeds.

When a row fails​

Common errors and solutions​

ErrorCauseSolution
Sign-in error before BLS is calledThe signed-in user token is missingRefresh while signed in to Rippling
Configuration errorThe key or series list is emptySave both settings, then refresh
"Enter at most 50 OEWS series IDs."More than 50 series were enteredShorten the list and save again
Series ID length errorA series ID is not 25 charactersReplace the ID with a valid OEWS series ID
"BLS rate limit reached. Try again later."BLS returned HTTP 429Wait, then refresh. The ingest run is ERROR
Ingest status ERROR with an HTTP statusBLS rejected the requestRead bls_message__c, fix the key or series, and refresh
Snapshot status SUPPRESSEDBLS returned an empty wage cellKeep the row for history, or drop that series if you do not need it

A pull that fails still writes an ingest run. Check that object before you look for a missing snapshot.

Set up monitoring​

What to watchWhere to look
Whether pull_oews_snapshots ran, and what it returnedGet started with functions
Which pulls failed, and the redacted reason in bls_message__cIngest Runs in the app. See Get started with custom objects
Which snapshots are ERROR or still SUPPRESSEDOEWS Snapshots. Filter the list the same way as list views

Build on the imported data (optional)​

Publish a transformation​

Use transformations on OEWS Snapshot when you want an analysis layer. For example:

  • Join market data to employee job or location data.
  • Calculate a compa-ratio against the market median.
  • Convert annual wages to hourly or monthly values.
  • Keep the latest survey year for each occupation and area.
  • Publish a smaller reporting object with only the fields you want to share.

The function keeps retrieving and storing source data. The transformation handles joins, calculations, and the reporting shape.

Schedule refreshes​

Trigger pull_oews_snapshots from as automation on a cadence that fits the source data. Stay inside the BLS rate limits and the package limit of 50 series. For how an automation starts a function, see Invoke functions.

Add dashboards or an AI experience​

Create reports and dashboards from the snapshots or a published transformation. You can also build an agent that compares a role to selected market data, provided the agent and users have access to the underlying objects.


See also​