ThinkLP
Insights Cases API

CreateCaseFromTransactionsRequest

​TheftCaseInput · required

Case header for the investigation case to create. These fields map to the Theft Case API. See that reference for the authoritative and complete field list. This endpoint derives the case's involved persons and case items from the transactions' employees and line items. It ignores any value you supply here for those collections.

​TransactionSnapshot[] · minItems: 1 · required

Frontier transactions to snapshot and link. Must contain at least one entry.

TheftCaseInput

Case header for the investigation case to create. These fields map to the Theft Case API. See that reference for the authoritative and complete field list. This endpoint derives the case's involved persons and case items from the transactions' employees and line items. It ignores any value you supply here for those collections.
investigationType
​string | null

Investigation type picklist value (e.g. External Theft, Internal Theft). Immutable after create.

incidentDate
​string | null · date

Date of the incident (YYYY-MM-DD).

status
​string | null

Case status picklist value (Open, Closed, Pending Assignment, Pending Approval). narrative is required when Closed.

incidentType
​string | null

Incident type picklist value.

primaryLocationId
​string | null

Salesforce Id of the primary location record.

narrative
​string | null

Free-text narrative description of the incident.

initialCaseValue
​number | null

Initial estimated value of the case. Immutable after create.

investigatorId
​string | null

Salesforce User Id of the assigned investigator.

TransactionSnapshot

transactionId
​string · required

Frontier-side transaction identifier (snapshot value, not a Salesforce Id). Unique per case.

transactionNumber
​string | null
transactionDate
​string | null · date
transactionTotal
​number | null
relatedEmployeeId
​string | null

Frontier-side employee identifier. The API matches it as a Salesforce Contact Id to resolve a canonical Person. When a Contact has no canonical Person, the API provisions one from the Contact's name, so a 201 means every employee named on the payload is linked.

The API rejects these values:

  • A value that is not a well-formed Salesforce Id — 400 INVALID_CASE_PAYLOAD.
  • A Contact the API cannot provision a Person for — 400 INVALID_CASE_PAYLOAD.
  • An Id that matches no Contact — 404 REFERENCE_NOT_FOUND.
frontierUrl
​string | null
​array | null

POS line items on the transaction.

LineItem

sku
​string · required

Stock keeping unit. Aggregated case-insensitively and used to provision or find the canonical Item.

quantity
​number | null
unitValue
​number | null

Per-unit value at the time of the incident.

upc
​string | null
serialNumber
​string | null
category
​string | null
unitType
​string | null
description
​string | null

CreateCaseFromTransactionsResponse

caseId
​string · required

Salesforce Id of the created investigation case.

caseUrl
​string · required

Absolute URL to the created case record.

linkedTransactionCount
​integer · required

Number of transactions snapshotted and linked.

linkedInvolvedPersonCount
​integer · required

Distinct employees resolved to Persons and attached as involved persons.

skippedEmployeeCount
​integer · required

Retained for wire compatibility, and always 0. An employee that cannot be resolved to a Person fails the request instead.

linkedCaseItemCount
​integer · required

Distinct line-item SKUs provisioned as Items and attached as case items.

LinkedTransaction

transactionId
​string
transactionNumber
​string | null
transactionDate
​string | null · date
transactionTotal
​number | null
relatedEmployeeId
​string | null

Frontier-side employee identifier (snapshot value).

frontierUrl
​string | null

BadgeMap

Map keyed by every queried Frontier transaction id. The value is a BadgeResponse when the transaction is linked to a case. The value is null when the transaction is not linked. A transaction that was queried but is not linked is distinct from one that was never queried.
caseId
​string · required

Salesforce Id of the linked case.

caseUrl
​string | null

Absolute URL to the linked case record.

BadgeResponse

caseId
​string · required

Salesforce Id of the linked case.

caseUrl
​string | null

Absolute URL to the linked case record.

StandardError

code
​string · enum · required
Enum values:
BAD_REQUEST
INVALID_CASE_PAYLOAD
EMPTY_TRANSACTION_SET
BATCH_TOO_LARGE
FLS_DENIED
NOT_FOUND
REFERENCE_NOT_FOUND
ALREADY_LINKED
message
​string · required

Sanitized human-readable message.