# Build a POS to Time and Attendance solution

> Ingest POS clock-ins through pipelines into Rippling Time and Attendance.

## Overview

This guide shows you how to bring completed shifts from a point-of-sale (POS) system into Rippling Time & Attendance. You’ll pull punches into a raw object, match them to Rippling workers, and post them as time entries. Once a punch is a time entry, Rippling’s time and payroll policies apply to it the same way they apply to punches created in Rippling.

### When to use this solution

Use this approach when employees clock in on a POS and you want to:

-   Stage completed shifts in Rippling before they become time entries.
-   Match POS employees to Rippling workers.
-   Post punches that can proceed through Rippling’s time and payroll policies.

### What you'll build

-   A managed or [custom pipeline](https://developer.rippling.com/documentation/rippling-platform/pipelines/custom-pipeline-setup) to pull punches from the POS.
-   [Custom objects](https://developer.rippling.com/documentation/rest-api/guides/customobjects) to stage those punches.
-   A [transformation](https://developer.rippling.com/documentation/rippling-platform/transformations/getting-started) to map punches to Rippling workers for the [Create a new time entry](https://developer.rippling.com/documentation/rest-api/reference/create-time-entries) API.
-   A [function](https://developer.rippling.com/documentation/rippling-platform/developer/functions/getting-started) to create the time entries.
-   An [automation](https://developer.rippling.com/documentation/rippling-platform/developer/workflows/get-started) to run the sync.

### Architecture

1.  Pull punches from the POS into a raw custom object that the pipeline creates.
2.  Map those punches to Rippling workers so each row has the `worker_id` Time & Attendance expects.
3.  Post time entries from that dataset.
4.  Run the post on a schedule, after the transformation has refreshed.

_**Figure 1:** Punches leave the POS, land in a raw object, and become time entries after the transformation and function run._

## Requirements

Before you begin, you need:

-   **Rippling products:** API SKU, Pipelines, Custom Objects, Transformations, Functions, Automations, and Time & Attendance.
-   Acceptance into the **Developer Program**, which is currently in a closed beta, or a **Rippling account** with these permissions:
    -   Permission to build a pipeline (Rippling AI subscription).
    -   Permission to create a function (Rippling Unity Pro subscription or higher).
-   If you are in the Developer Program, build in a developer sandbox (beta). Otherwise, build in your Rippling account. The pipeline, transformation, function, and automation must belong to the same company.
-   Workers in Rippling whose identifier matches the POS, which in this example is `work_email`.
-   **API access:**
    -   Credentials for the POS (API key or OAuth token).
    -   A Rippling API token with these scopes. A nightly automation has no logged-in user, so the function reads this token from a custom setting instead of the invoking user’s token.

| Scope | Access |
| --- | --- |
| `time-entries.read-write` | Create and manage time entries in Time & Attendance. |
| `custom-objects.read` | Read custom objects, including the transformed punch dataset. |
| `custom-object-records.read` | Read records (data rows) on custom objects. |

> **Code samples are illustrative:**
> These samples show how the pieces fit together. Before you rely on them in production, confirm the raw object’s API names in **Data > Catalog**, match workers on an identifier you store (this sample uses `work_email`), send `start_time` and `end_time` with a timezone offset, and post with an `idempotency_key` so a second nightly run does not create a second punch.

## Video walkthrough

If you prefer a visual guide, watch one of our Forward Deployed Engineers build this solution using the steps in this guide.

#### Bring POS data into Rippling Time & Attendance

[Bring POS data into Rippling Time & Attendance](https://fast.wistia.net/embed/iframe/je4for1or0?web_component=true&seo=false)

* * *

## Pull punches into staging

A pipeline calls the POS on a schedule and writes each stream into a custom object, so you do not need to create that object by hand. When Rippling already maintains that connection, use the managed pipeline. You authenticate, choose the streams to sync, and Rippling keeps the connection up to date. See [Managed pipelines](https://help.rippling.com/article?articleId=1Pvx5RtKfzg8rwoG6dyb2E) in Help Center for the current list, or create a [custom pipeline](https://developer.rippling.com/documentation/rippling-platform/pipelines/custom-pipeline-setup) when your POS is not included.

### Publish the pipeline

1.  Navigate to **Data > Pipelines**.
2.  Choose the managed pipeline for your POS, or click **\+ New API connection** when you are building a custom pipeline.
3.  Enter the API credentials and choose the stream that contains time punches (`employee_email`, `clock_in`, and `clock_out`). Credential steps for a managed pipeline are in [Managed pipelines](https://help.rippling.com/article?articleId=1Pvx5RtKfzg8rwoG6dyb2E).
4.  Set the stream’s **Record ID path** to the punch ID in the POS payload. The pipeline uses that value to update a punch instead of inserting a second row. The sample SQL calls that column `source_entry_id`. If the object in your catalog uses a different name, use that name in the query.
5.  Publish the pipeline and wait until at least one completed punch is in the catalog.

### Check that punch rows landed

Open the destination object and confirm the columns you will transform. A usable punch row looks like this:

| Field | Example from the POS | Why |
| --- | --- | --- |
| `source_entry_id` | `pos_punch_1842` | Deduplication key later, and the time entry `idempotency_key` |
| `employee_email` | `mjones@example.com` | Join to a Rippling worker on `work_email` |
| `clock_in` | `2026-10-07T22:00:00-07:00` | Becomes `start_time` in the query |
| `clock_out` | `2026-10-08T00:00:00-07:00` | Becomes `end_time` in the query. Leave rows where `clock_out` is null out of the query |

List the object in the catalog and check `source_entry_id`, `employee_email`, `clock_in`, and `clock_out` before you write SQL. A transformation cannot fix a pipeline that never landed `source_entry_id`.

* * *

## Map punches to Rippling workers

Create a [transformation](https://developer.rippling.com/documentation/rippling-platform/transformations/getting-started) that reads the raw punch and fills in the Rippling `worker_id` the time entry API expects.

The SQL below keeps closed shifts, joins each punch to a worker, and returns the columns the function posts. Replace `pos_time_punch` and the column names with the SQL names from your catalog, which the editor lists when you type the object name and a dot.

### Write the transformation

1.  Navigate to **Data > Transformations** and select **+New transformation**.
2.  Customize the following SQL for your setup:

```sql
SELECT
  pos.source_entry_id AS source_entry_id,
  emp.id AS worker_id,
  pos.clock_in AS start_time,
  pos.clock_out AS end_time,
  CAST(pos.clock_in AS DATE) AS business_date
FROM pos_time_punch AS pos
INNER JOIN Employee AS emp
  ON LOWER(pos.employee_email) = LOWER(emp.work_email)
WHERE pos.clock_out IS NOT NULL
```

`Employee.id` is the `worker_id` Time & Attendance expects, and `Employee.work_email` is the match key in this example. Use a different key when the POS stores an employee number instead of `employee_email`. `business_date` is not a POS column. The query derives it from `clock_in`, and that date can differ from the date in `clock_out`.

The same value has a different name at each step. Use the name for the step you are in.

| POS column in this sample | SQL result | Custom object field the function reads |
| --- | --- | --- |
| Punch ID, called `source_entry_id` in the sample | `source_entry_id` | `source_entry_id__c` |
| `employee_email`, joined to `Employee.id` | `worker_id` | `worker_id__c` |
| `clock_in` | `start_time` | `start_time__c` |
| `clock_out` | `end_time` | `end_time__c` |
| `CAST(clock_in AS DATE)` | `business_date` | `business_date__c` |

Click **Run**. You should see the same punches as the raw object, now with a `worker_id`, `start_time`, `end_time`, and `business_date`. An inner join drops any POS `employee_email` that is not a Rippling `work_email`, so if a row disappears, fix `employee_email` or the worker record rather than switching to a left join and posting a null `worker_id`.

When you publish the transformation, Rippling creates a custom object for the result, such as `pos_time_entry__c`. Each row is a closed punch joined to a worker:

```json
{
  "source_entry_id": "pos_punch_1842",
  "worker_id": "65699281fb7bc7c3510f44a6",
  "start_time": "2026-10-07T22:00:00-07:00",
  "end_time": "2026-10-08T00:00:00-07:00",
  "business_date": "2026-10-07"
}
```

### Publish the dataset

Save the result as a **custom object** so functions, automations, and reports can read it. A big object or a live object cannot feed this function, because those types are limited to reports, dashboards, and other transformations.

1.  Select **Publish**, and configure the following:
    -   **Category**: Custom object
    -   **Display name**: e.g., "POS time entries"
    -   **API name**: Auto-created based on the display name (the API name cannot be edited after the transformation is published)
    -   **SQL name**: e.g., `pos_time_entry`
2.  Select **Continue**. Rippling runs the SQL against the full dataset here.
3.  On the field screen, set types before you continue:

| Column | Type | Notes |
| --- | --- | --- |
| `source_entry_id` | Text | Deduplication key |
| `worker_id` | Lookup to the worker | A link to the worker record, not a text ID. Rippling may suggest this because the column comes from `Employee.id`. The record then shows the person, and the function can read `worker_id__c`. |
| `start_time` | DateTime | Keep the offset from the POS |
| `end_time` | DateTime | Keep the offset from the POS |
| `business_date` | Date | Shift date, not the day the job runs |

4.  Choose `source_entry_id` as the **deduplication key** so a refresh updates that punch instead of inserting another row. If two SQL rows share a key, Rippling keeps the first.
5.  For **refresh behavior**, choose **Overwrite all records** when Rippling is not the place anyone edits these rows. A nightly POS sync should replace the object with the latest SQL result. Choose **Keep edited fields** or **Keep edited records** only if someone corrects punches on this object between syncs. Those choices preserve manual edits and hide a newer POS value.
6.  Select **Publish**.

You now have two objects: the raw pipeline object and this transformed object. Grant the function’s API token access to the transformed object in **Object Permissions**. A lookup that points at a missing worker fails the refresh.

> **Refresh the transformation before posting time entries:**
> Custom objects from transformations refresh on a [schedule](https://developer.rippling.com/documentation/rippling-platform/transformations/refresh-schedules) or when you click **Refresh data**. A new punch does not appear in `pos_time_entry__c` until that refresh runs.

* * *

## Post the time entries

This function reads the published dataset and creates the time entries. After you publish, replace `pos_time_entry__c` in the code with the API name Rippling assigned. That name comes from the display name and cannot be changed later. The JSON below uses the SQL names. In the function, those fields are `worker_id__c`, `start_time__c`, `end_time__c`, and `source_entry_id__c`.

```typescript
const TRANSFORMED_OBJECT = "pos_time_entry__c";
```

The create call sends one shift per punch:

```json
{
  "worker_id": "65699281fb7bc7c3510f44a6",
  "status": "DRAFT",
  "idempotency_key": "pos_punch_1842",
  "job_shifts": [
    {
      "start_time": "2026-10-07T22:00:00-07:00",
      "end_time": "2026-10-08T00:00:00-07:00"
    }
  ]
}
```

| Field | Send | Why |
| --- | --- | --- |
| `worker_id` | Lookup ID from the transformation | Required. This is the Rippling `worker_id` rather than the POS employee ID. |
| `job_shifts[].start_time` / `job_shifts[].end_time` | ISO-8601 with an offset | A `clock_out` of midnight belongs on the next calendar date. The offset keeps 10:00 p.m. Pacific from becoming 10:00 p.m. Central. |
| `idempotency_key` | `source_entry_id` | Rippling rejects a second entry with the same `idempotency_key`. The nightly job can run again safely. |
| `status` | `DRAFT` until you intend to auto-approve | `DRAFT` needs review, while `APPROVED` and `FINALIZED` skip that review, and `PAID` means the time is already paid. |

`duration` and `job_shifts` are mutually exclusive. POS punches have a start and an end, so send `job_shifts`.

### Save the API token

The time entry function reads this setting because the automation that runs it has no logged-in user.

1.  Open **Developer**, then select **Custom Settings** under **Build**. If your sidebar groups apps under **Tools**, open **Tools > Developer** first.
2.  Click **New** and add the following setting:

| Display name | Input type | Value |
| --- | --- | --- |
| `rippling_api_token` | Secret | API token |

After creating the time entry function below, [link this setting to it](https://developer.rippling.com/documentation/rippling-platform/developer/custom-settings#linking-settings-to-functions) before running it.

### Create the time entry function

1.  Navigate to **Tools > Developer > Functions**.
2.  Click **+New**, name the function `POS Post Time Entry`, and select **Save**.
3.  Customize the following code for your setup:

```typescript
import RipplingSDK, {
  FunctionContext,
  FunctionEvent,
  FunctionResponse,
} from "@rippling/rippling-sdk";

const TRANSFORMED_OBJECT = "pos_time_entry__c";

export async function onRipplingEvent(
  event: FunctionEvent,
  context: FunctionContext
) {
  const token = context.settings["rippling_api_token"];
  const ripplingSDK = new RipplingSDK({ bearerToken: token });

  const rows = await ripplingSDK.customObjects.records.query(TRANSFORMED_OBJECT, {
    query: "source_entry_id__c != null AND worker_id__c != null",
    limit: event.parameters?.limit ?? 100,
  });

  const posted = [];
  const errors = [];

  for (const row of rows.results ?? []) {
    const workerId = row.worker_id__c?.id ?? row.worker_id__c;
    const sourceId = row.source_entry_id__c;

    try {
      const entry = await ripplingSDK.timeEntries.create({
        worker_id: workerId,
        status: "DRAFT",
        idempotency_key: sourceId,
        job_shifts: [
          {
            start_time: row.start_time__c,
            end_time: row.end_time__c,
          },
        ],
      });
      posted.push({ sourceId, timeEntryId: entry.id });
    } catch (err) {
      const message = err instanceof Error ? err.message : String(err);
      errors.push({ sourceId, message });
    }
  }

  return new FunctionResponse({
    statusCode: errors.length ? 207 : 200,
    body: { posted, errors },
    headers: {},
    message: `Posted ${posted.length}, errors ${errors.length}`,
  });
}
```

4.  **Save** and **deploy** the function.

Rippling rejects a second time entry that reuses an `idempotency_key`, so on the next night those rows show up in `errors`. Treat that rejection as already posted when you alert payroll, and alert on everything else.

> **A function step times out after 50 seconds:**
> The sample reads at most `limit` rows, and uses 100 when you do not pass `limit`. If a night has more punches than one call can post, run the function again for the remaining rows, or split workers across steps. For more information, see [Invoke functions](https://developer.rippling.com/documentation/rippling-platform/developer/functions/invoking-functions).

Add job codes on `job_shifts[].job_codes_id` only after those codes exist in Rippling. [Create and manage time entries](https://developer.rippling.com/documentation/rest-api/guides/create-time-entry) lists breaks, tags, and pay period fields when the POS sends them.

* * *

## Run the sync on a schedule

Once the function works on its own, use as [automation](https://developer.rippling.com/documentation/rippling-platform/developer/workflows/get-started) to run it. `POS Post Time Entry` reads the transformed object, not the raw pipeline object, so a punch you just pulled will not show up until the transformation refresh finishes.

### Post time entries after the dataset refreshes

1.  Navigate to **Tools > Automation Studio** and select **Create automation**.
2.  Select the pencil icon in the top left-hand corner and name the automation "POS Time Entry Sync".
3.  Select **Choose your automation trigger** > **On a set schedule**. Configure the schedule (for example, every day at 11:30 p.m.) and click **Select** > **Continue**.
4.  Add a step that refreshes the transformation, then add the **Run Function** step and drag it under that refresh in the editor. For more information, see [Refresh transformations](https://developer.rippling.com/documentation/rippling-platform/transformations/refresh-schedules).
5.  Click **Run Function** > **Editor** and select `POS Post Time Entry` from the **Function** dropdown. Pass any parameters (for example `{ "limit": 100 }`). Select **Continue**.
6.  Select **Save** > **Save and publish**.

To notify payroll when `errors` is not empty, define an output schema on the function step so a later step can read `posted` and `errors`, then add **Send an email**.

Scheduled automations are picked up by a job every 15 minutes (`:00`, `:15`, `:30`, `:45`), so 11:30 p.m. lands on that grid. Avoid one-time times that end in `:14`, `:29`, `:44`, or `:59`, because those minutes are not inside any sweep. For more information, see [Automation troubleshooting](https://developer.rippling.com/documentation/rippling-platform/developer/workflows/troubleshooting#the-automation-uses-a-one-time-schedule-set-to-a-boundary-minute).

Run the pieces in this order:

1.  The pipeline writes raw punches, either earlier the same evening or on its own schedule.
2.  The transformation refresh rewrites the custom object. Custom objects from transformations also refresh nightly, so if the function must see today’s SQL, refresh the transformation in this automation instead of waiting for that window.
3.  The function posts new punches, and existing `idempotency_key` values stay as they are.

* * *

## Test the flow

### Test the pipeline

1.  Navigate to **Data > Pipelines** and run the pipeline, or wait for its schedule.
2.  Open the raw object in **Data > Catalog**.
3.  Confirm a completed punch has a `source_entry_id`, an `employee_email`, a `clock_in`, and a `clock_out`.

### Test time entry creation

1.  Verify the transformed object has rows with a `worker_id` and an `end_time`.
2.  Navigate to **Tools > Developer > Functions**.
3.  Select the `POS Post Time Entry` function.
4.  Click **Test console** and provide sample input:

```json
{
  "parameters": {
    "limit": 100
  }
}
```

5.  Click **Run test** to check the test output. A successful run looks like this:

```json
{
  "statusCode": 200,
  "body": {
    "posted": [
      {
        "sourceId": "pos_punch_1842",
        "timeEntryId": "65699281fb7bc7c3510f44a6"
      }
    ],
    "errors": []
  },
  "headers": {},
  "message": "Posted 1, errors 0"
}
```

6.  Open Time & Attendance and confirm the time entry is `DRAFT`.

### Test the full path

1.  Clock a test shift on the POS and close it.
2.  Run the pipeline, then refresh the transformation.
3.  Run `POS Post Time Entry` from the test console, or run the POS Time Entry Sync automation.
4.  Verify the punch appears in the raw object, then in the transformed object.
5.  Verify the time entry appears on the timesheet for that `business_date`.

The same instant can display on a different clock time when the viewer’s timezone differs from the POS. In the walkthrough, two Pacific shifts showed on a Central timesheet like this:

| POS (Pacific) | Timesheet (viewer in Central) |
| --- | --- |
| 10:00 p.m.–12:00 a.m. | 12:00 a.m.–2:00 a.m. the same night |
| 12:15 a.m.–2:15 a.m. | 2:15 a.m.–4:15 a.m. |

Those are the same instants, because Central is two hours ahead of Pacific during daylight saving. If the hours look shifted, compare the offset on `start_time` and `end_time` with the timezone of the person viewing the timesheet before you change the SQL.

* * *

## When a row fails

### Common errors and solutions

| Error | Cause | Solution |
| --- | --- | --- |
| Nothing in the raw object | Pipeline credentials, stream, or a paused sync | Check the pipeline and run the pipeline again |
| Raw row, no transformed row | The join missed the worker, or `clock_out` is null | Fix `employee_email` or the worker record, and leave rows with a null `clock_out` out of the query |
| Transformed row, no time entry | Function not deployed, token missing `time-entries.read-write`, or `worker_id__c` is not a lookup ID | Deploy the function and confirm `worker_id__c` is a lookup |
| Time entry on the wrong date | Offset omitted, so the timestamp was read as UTC or as the viewer’s zone | Send `start_time` and `end_time` with a timezone offset |
| Second entry for the same punch | `idempotency_key` was empty or changed between runs | Send `source_entry_id` as `idempotency_key` |
| A function step timed out | More punches than one call can post in 50 seconds | The sample stops at `limit` rows. Run the function again for the rest, or split workers across steps |

After the sync is running, check the transformed object for punches that never became time entries. A row that stays there for more than a day usually means the transformation has not refreshed, or the automation did not run.

### Set up monitoring

Use the function log, a report on the transformed object, and a automation.

| What to watch | Where to look |
| --- | --- |
| Whether `POS Post Time Entry` ran, and what it returned | [Get Started with functions](https://developer.rippling.com/documentation/rippling-platform/developer/functions/getting-started#view-execution-logs) |
| Which punches are in the transformed object but missing from Time & Attendance | Build the report with [Get started with reports](https://developer.rippling.com/documentation/rippling-platform/reports/getting-started), then narrow it with [Filters and time frames in reports](https://developer.rippling.com/documentation/rippling-platform/reports/filters). The transformed object is a custom object, so you can also see [Get started with custom objects](https://developer.rippling.com/documentation/rippling-platform/custom-objects/getting-started). |
| When `errors` is not empty | Add an email on the [POS Time Entry Sync](https://developer.rippling.com/documentation/rippling-platform/solution-guides/time-attendance-integration#post-time-entries-after-the-dataset-refreshes) automation. For more information, see [Get started with automations](https://developer.rippling.com/documentation/rippling-platform/developer/workflows/get-started). |

* * *

## See also

-   [Create and manage time entries](https://developer.rippling.com/documentation/rest-api/guides/create-time-entry)
-   [POST create a new time entry](https://developer.rippling.com/documentation/rest-api/reference/create-time-entries)
-   [Create and manage custom objects](https://developer.rippling.com/documentation/rest-api/guides/customobjects)
-   [Get started with custom objects](https://developer.rippling.com/documentation/rippling-platform/custom-objects/getting-started)
-   [Get started with reports](https://developer.rippling.com/documentation/rippling-platform/reports/getting-started)
-   [Filters and time frames in reports](https://developer.rippling.com/documentation/rippling-platform/reports/filters)
-   [Create and manage functions](https://developer.rippling.com/documentation/rest-api/guides/functions)
-   [Get started with functions](https://developer.rippling.com/documentation/rippling-platform/developer/functions/getting-started)
-   [Invoke functions](https://developer.rippling.com/documentation/rippling-platform/developer/functions/invoking-functions)
-   [Get started with pipelines](https://developer.rippling.com/documentation/rippling-platform/pipelines/getting-started)
-   [Set Up a custom pipeline](https://developer.rippling.com/documentation/rippling-platform/pipelines/custom-pipeline-setup)
-   [Get started with transformations](https://developer.rippling.com/documentation/rippling-platform/transformations/getting-started)
-   [Refresh transformations](https://developer.rippling.com/documentation/rippling-platform/transformations/refresh-schedules)
-   [Get started with automations](https://developer.rippling.com/documentation/rippling-platform/developer/workflows/get-started)

Source: https://developer.rippling.com/documentation/rippling-platform/solution-guides/time-attendance-integration

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
