본문으로 건너뛰기
cccskills
무료GitHub에 공개

guidewire-hello-world

Execute first API calls to Guidewire PolicyCenter, ClaimCenter, and BillingCenter. Use when testing initial connectivity, exploring API structure, or making your first insurance data requests. Trigger with phrases like "guidewire hello world", "first guidewire call", "test policycenter api", "guidewire api example".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md9.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Guidewire Hello World

Overview

Execute your first API calls to Guidewire InsuranceSuite Cloud APIs - PolicyCenter, ClaimCenter, and BillingCenter.

Prerequisites

  • Completed guidewire-install-auth setup
  • Valid OAuth2 access token
  • API role permissions for target endpoints

Instructions

Step 1: Test System Connectivity

# Get access token first
TOKEN=$(curl -s -X POST "${GW_HUB_URL}/oauth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=${GW_CLIENT_ID}&client_secret=${GW_CLIENT_SECRET}" \
  | jq -r '.access_token')

# Test PolicyCenter system info
curl -s "${POLICYCENTER_URL}/common/v1/system-info" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" | jq

Step 2: Query Accounts (PolicyCenter)

// List accounts with pagination
interface Account {
  id: string;
  accountNumber: string;
  accountHolder: {
    displayName: string;
  };
  accountStatus: {
    code: string;
  };
}

interface AccountsResponse {
  data: Account[];
  links: {
    next?: string;
    prev?: string;
  };
  count: number;
}

async function listAccounts(limit: number = 25): Promise<AccountsResponse> {
  const response = await client.request<AccountsResponse>(
    'GET',
    `/account/v1/accounts?pageSize=${limit}`
  );

  console.log(`Found ${response.count} accounts`);
  response.data.forEach(account => {
    console.log(`- ${account.accountNumber}: ${account.accountHolder.displayName}`);
  });

  return response;
}

Step 3: Create a Submission (PolicyCenter)

// Create a new policy submission
interface CreateSubmissionRequest {
  data: {
    attributes: {
      account: { id: string };
      baseState: { code: string };
      product: { code: string };
      producerCode: { id: string };
      effectiveDate: string;
    };
  };
}

interface Submission {
  id: string;
  jobNumber: string;
  status: { code: string };
}

async function createSubmission(
  accountId: string,
  productCode: string = 'PersonalAuto'
): Promise<Submission> {
  const request: CreateSubmissionRequest = {
    data: {
      attributes: {
        account: { id: accountId },
        baseState: { code: 'CA' },
        product: { code: productCode },
        producerCode: { id: 'pcid:DefaultProducerCode' },
        effectiveDate: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000)
          .toISOString().split('T')[0]
      }
    }
  };

  const response = await client.request<{ data: Submission }>(
    'POST',
    '/job/v1/submissions',
    request
  );

  console.log(`Created submission: ${response.data.jobNumber}`);
  return response.data;
}

Step 4: File a Claim (ClaimCenter)

// First Notice of Loss (FNOL)
interface FNOLRequest {
  data: {
    attributes: {
      lossDate: string;
      lossType: { code: string };
      lossCause: { code: string };
      description: string;
      reportedDate: string;
      policyNumber: string;
    };
  };
}

interface Claim {
  id: string;
  claimNumber: string;
  status: { code: string };
}

async function createFNOL(policyNumber: string): Promise<Claim> {
  const fnol: FNOLRequest = {
    data: {
      attributes: {
        lossDate: new Date().toISOString().split('T')[0],
        lossType: { code: 'AUTO' },
        lossCause: { code: 'vehcollision' },
        description: 'Vehicle collision at intersection',
        reportedDate: new Date().toISOString().split('T')[0],
        policyNumber: policyNumber
      }
    }
  };

  const response = await client.request<{ data: Claim }>(
    'POST',
    `${process.env.CLAIMCENTER_URL}/claim/v1/claims`,
    fnol
  );

  console.log(`Created claim: ${response.data.claimNumber}`);
  return response.data;
}

Step 5: Query Invoices (BillingCenter)

// List account invoices
interface Invoice {
  id: string;
  invoiceNumber: string;
  invoiceDate: string;
  dueDate: string;
  status: { code: string };
  amount: { amount: number; currency: string };
}

interface InvoicesResponse {
  data: Invoice[];
  count: number;
}

async function getAccountInvoices(accountId: string): Promise<InvoicesResponse> {
  const response = await client.request<InvoicesResponse>(
    'GET',
    `${process.env.BILLINGCENTER_URL}/billing/v1/accounts/${accountId}/invoices`
  );

  console.log(`Found ${response.count} invoices`);
  response.data.forEach(invoice => {
    console.log(`- ${invoice.invoiceNumber}: $${invoice.amount.amount} due ${invoice.dueDate}`);
  });

  return response;
}

Gosu Hello World (Server-Side)

// Gosu script to query PolicyCenter data
uses gw.api.database.Query
uses entity.Policy
uses entity.Account

class HelloGuidewire {

  static function listActiveAccounts() : List<Account> {
    var query = Query.make(Account)
      .compare(Account#AccountStatus, Equals, AccountStatus.TC_ACTIVE)
      .select()
      .toList()

    query.each(\account -> {
      print("Account: ${account.AccountNumber} - ${account.AccountHolderContact.DisplayName}")
    })

    return query
  }

  static function findPoliciesByAccount(accountNumber : String) : List<Policy> {
    var account = Query.make(Account)
      .compare(Account#AccountNumber, Equals, accountNumber)
      .select()
      .AtMostOneRow

    if (account == null) {
      throw new IllegalArgumentException("Account not found: ${accountNumber}")
    }

    return account.Policies.toList()
  }
}

Output

  • Successful API response from PolicyCenter
  • Account listing with pagination
  • Created submission with job number
  • FNOL claim creation confirmation
  • Invoice listing from BillingCenter

Error Handling

ErrorCauseSolution
404 Not FoundInvalid endpoint or resource IDVerify endpoint path and ID format
400 Bad RequestInvalid request payloadCheck required fields and data types
422 UnprocessableBusiness rule violationReview validation errors in response
409 ConflictConcurrent modificationRetry with updated checksum
415 Unsupported MediaWrong content typeUse application/json

API Response Structure

All Guidewire Cloud APIs follow this structure:

interface GuidewireResponse<T> {
  data: T;                    // The requested resource(s)
  included?: any[];           // Related resources (if requested)
  links?: {
    self: string;
    next?: string;
    prev?: string;
  };
  count?: number;             // Total count for collections
}

Common Resource Patterns

// Get single resource
GET /account/v1/accounts/{accountId}

// List resources with filters
GET /account/v1/accounts?filter=accountStatus:eq:Active&pageSize=50

// Create resource
POST /account/v1/accounts
{ "data": { "attributes": { ... } } }

// Update resource (PATCH)
PATCH /account/v1/accounts/{accountId}
{ "data": { "attributes": { ... }, "checksum": "abc123" } }

// Include related resources
GET /account/v1/accounts/{accountId}?include=accountHolder,primaryLocation

Examples

Complete Hello World Script

import { GuidewireClient } from './client';

async function main() {
  const client = new GuidewireClient(
    process.env.GW_CLIENT_ID!,
    process.env.GW_CLIENT_SECRET!,
    process.env.GW_HUB_URL!,
    process.env.POLICYCENTER_URL!
  );

  try {
    // 1. Test connectivity
    console.log('Testing PolicyCenter connectivity...');
    const systemInfo = await client.request('GET', '/common/v1/system-info');
    console.log('Connected:', systemInfo);

    // 2. List accounts
    console.log('\nListing accounts...');
    const accounts = await client.request('GET', '/account/v1/accounts?pageSize=5');
    console.log(`Found ${accounts.count} accounts`);

    // 3. Get account details
    if (accounts.data.length > 0) {
      const accountId = accounts.data[0].id;
      console.log(`\nGetting details for account: ${accountId}`);
      const account = await client.request('GET', `/account/v1/accounts/${accountId}`);
      console.log('Account details:', JSON.stringify(account, null, 2));
    }

    console.log('\nHello World complete!');
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

main();

Resources

Next Steps

For local development workflow, see guidewire-local-dev-loop.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Complete architecture reference for the A3 insurance platform — file locations, data flow, conventions, microservice map, and fullstack patterns

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FDU-INS/Insurance-Skills802026년 7월 12일 업데이트

Drafts U.S. commercial real estate access and indemnity (right-of-entry) agreements for pre-closing due diligence. Covers license grants, non-invasive vs invasive testing gates, insurance/endorsement requirements, indemnity with discovery carve-outs, restoration and lien remedies, confidentiality, and anti-indemnity guardrails. Trigger: access agreement, right of entry, due diligence access, Phase I/II, invasive testing, pre-PSA site inspection.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FDU-INS/Insurance-Skills802026년 7월 12일 업데이트

当用户需要对意外险投保问卷进行专业、结构化的核保审查,提取职业类别、工作环境、作业内容、危险活动参与情况、交通出行习惯、特殊工作暴露及其他可能影响意外险承保判断的高风险信息,并生成适合意外险核保、补问流转和风险分层处理的结构化分析结果时使用本 skill。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FDU-INS/Insurance-Skills802026년 7월 12일 업데이트

Inspect, schema, and fill true AcroForm PDFs using sciClaw's pdf_form_inspect, pdf_form_schema, and pdf_form_fill tools. Use when: (1) checking whether a PDF is a real fillable AcroForm, (2) listing form field names, types, and choices, (3) filling a supported form from structured values, (4) preparing reviewable insurance, legal, administrative, or clinical form drafts, (5) reporting skipped fields or unused input keys after a fill. Do not use for scanned PDFs, OCR tasks, or XFA-only forms.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FDU-INS/Insurance-Skills802026년 7월 12일 업데이트

Guide actuarial analysis for insurance pricing. TRIGGERS - Use when user needs help with actuarial-analysis related tasks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FDU-INS/Insurance-Skills802026년 7월 12일 업데이트

Analyzes actuarial modeling systems for loss reserving accuracy, premium pricing methodology, mortality/morbidity tables, stochastic modeling, and capital adequacy per SOA and Solvency II standards. USE THIS SKILL WHEN: - You need to review or audit actuarial models (reserving, pricing, capital) - Someone asks about loss triangle analysis or reserve adequacy - You are evaluating IBNR calculations, chain ladder methods, or Bornhuetter-Ferguson - A project involves insurance pricing, GLM rating models, or ratemaking - You need to assess Solvency II SCR calculations or RBC compliance - Someone mentions actuarial opinions, ASOP compliance, or SOA standards - You are reviewing stochastic models, ESG configurations, or DFA frameworks - A codebase uses actuarial libraries (chainladder, lifetables, ChainLadder R package) TRIGGER PHRASES: "actuarial", "loss reserving", "IBNR", "chain ladder", "premium pricing", "mortality table", "Solvency II", "capital adequacy", "ratemaking", "GLM pricing", "risk-based capital", "reserve analysis", "actuarial opinion"

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

FDU-INS/Insurance-Skills802026년 7월 12일 업데이트

FDU-INS의 스킬 모두 보기

이 스킬의 문제 신고