View as Markdown

Attest · Guide

Connect a claim system

Available on Enterprise

Use a claim-system connector to put Attest's verdict, risk score and a link back to the console onto the claim record your adjusters already work in. The connector also opens an Attest case when a new claim is created.

A connector is a small stateless service from @provenanceauth/connectors. It receives Attest's signed webhooks, verifies each signature, writes the mapped fields to Guidewire ClaimCenter or Duck Creek Claims, and ignores an event it has already handled. If the claim system is unavailable, it answers with a 5xx so the webhook is retried.

Before you begin: a webhook endpoint pointing at where the connector will run, subscribed to attest.claim.provenance_updated and attest.case.status_changed, and its signing secret. You also need API credentials for your claim system.

1. Run the connector

The provenance-connector service listens on port 8091 at POST /webhooks/provenance. Configure it with environment variables:

VariableValue
CONNECTOR_PLATFORMguidewire or duckcreek
PROVENANCE_WEBHOOK_SECRETThe webhook endpoint's whsec_… secret
PROVENANCE_DEEPLINK_BASEYour console URL, for the link on each claim
PLATFORM_BASE_URLYour ClaimCenter Cloud API or Duck Creek base URL
PLATFORM_TOKENA ClaimCenter bearer token (Guidewire)
PLATFORM_API_KEYA Duck Creek API key (Duck Creek)

This package isn't on npm yet. Until then, every request in these docs runs over HTTP against the sandbox.

With access to the private Provenance repository, which your Provenance contact grants, install from it:

git clone https://github.com/michaelnbane-jpg/provenance.git provenance
cd provenance && pnpm install && pnpm build
node scripts/check-publishable.mjs --out ../provenance-packs
cd ../your-project
npm install ../provenance-packs/provenanceauth-sdk-1.0.0.tgz ../provenance-packs/provenanceauth-connectors-1.0.0.tgz
CONNECTOR_PLATFORM=guidewire \
PROVENANCE_WEBHOOK_SECRET=whsec_dv7-dPyLHZOWdkn-bWPXg59ZLpp9AO5O \
PROVENANCE_DEEPLINK_BASE=https://console.example.com \
PLATFORM_BASE_URL=https://claims.example.com/cc/rest \
PLATFORM_TOKEN=gw-token \
  npx --no provenance-connector

2. Choose the fields to write

Each connector ships a default map from webhook fields to claim-record fields. For Guidewire:

ClaimCenter fieldWebhook field
ProvenanceRiskScoredata.overall_risk_score
ProvenanceStatusdata.overall_status
ProvenanceVerdictdata.verdict
ProvenanceCaseStatusdata.case_status

Every write also sets provenance_deep_link to the claim in the console. To use your own field names, run the connector in your own service with a custom map:

import { createServer } from "node:http";
import { EventDedupe, handleProvenanceWebhook } from "@provenanceauth/connectors";
import { guidewireClient, guidewireConfig } from "@provenanceauth/connectors/guidewire";

const config = guidewireConfig({
  webhookSecret: process.env.PROVENANCE_WEBHOOK_SECRET!,
  deepLinkBase: "https://console.example.com",
  fieldMap: { Fraud_Risk_Score__c: "data.overall_risk_score", Media_Verdict__c: "data.overall_status" },
});
const client = guidewireClient({ baseUrl: process.env.PLATFORM_BASE_URL!, bearerToken: process.env.PLATFORM_TOKEN! });
const dedupe = new EventDedupe();

createServer(async (req, res) => {
  let body = "";
  for await (const chunk of req) body += chunk;
  const result = await handleProvenanceWebhook(config, body, req.headers["provenance-signature"] as string, client, dedupe);
  res.writeHead(result.status, { "Content-Type": "application/json" }).end(JSON.stringify(result.body));
}).listen(8091);

The handler verifies the signature over the exact request bytes, so pass the raw body.

3. Open a case when a claim is created

The reverse direction turns a claim-created event from your claim system into the fields for opening an Attest case:

import { guidewireClaimToCaseOpen } from "@provenanceauth/connectors/guidewire";

const { claim_id, claim_type, state } = guidewireClaimToCaseOpen(claimCenterEvent);
// Attest then creates the case the first time the claim is viewed or attested.

Limitations: the connectors are tested against recorded ClaimCenter and Duck Creek API shapes. Run them against your claim system's test environment before production.

Errors you might see

SymptomCauseFix
The connector answers 401The webhook signature didn't verifyCheck PROVENANCE_WEBHOOK_SECRET matches the endpoint's secret.
The connector answers 502The claim system rejected the writeCheck the platform credentials; the webhook is retried.
A claim isn't updatedThe event has no claim_id, or was already handledOnly claim events carry a claim; repeats are skipped by design.

See also