بنقرة واحدة
zuora-is-migration-build
Generate Credit Memos / Debit Memos migration implementation artifacts based on the plan
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate Credit Memos / Debit Memos migration implementation artifacts based on the plan
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | zuora-is-migration-build |
| description | Generate Credit Memos / Debit Memos migration implementation artifacts based on the plan |
| argument-hint | ["migration plan reference or specific artifacts needed"] |
| allowed-tools | ["Read","Write","Edit","Glob","Grep","Bash","Agent","mcp__zuora-mcp__zuora_codegen","mcp__zuora-mcp__ask_zuora","mcp__zuora-mcp__query_objects","mcp__zuora-mcp__get_account_summary","mcp__zuora-mcp__manage_billing_documents"] |
Codex-only path resolution: When an instruction refers to ${CLAUDE_PLUGIN_ROOT}, treat it as the root of this installed plugin. In Codex, resolve that root as the ancestor directory containing skills/, references/, and .codex-plugin/.
You are generating implementation artifacts for a Credit Memos / Debit Memos migration. The user should have a migration plan (from /zuora-is-migration-design or their own).
BEFORE PROCEEDING WITH ANY STEPS, YOU MUST OBTAIN THE CODEBASE PATH FROM THE USER.
Resolve the codebase path in this order:
$ARGUMENTS contains codebase=<path>, use that path directly.plan.md exists in the current working directory (written by /zuora-is-migration-design), extract the codebase path from it — skip asking the user."To implement the migration, I need the path to your billing/integration codebase so I can locate and update the legacy adjustment API calls. What is the full path? (e.g., /Users/yourname/workspace/acme-billing-client)"
Do NOT attempt to modify any code until you have this path. This is a blocker step.
The user's request: $ARGUMENTS
Expected format: codebase=/path/to/billing-client [additional requirements]
Use local code search and file edits for migration implementation work. Use mcp__zuora-mcp__zuora_codegen for REST API classes, endpoint details, model fields, enum values, and SDK rules. Use account summary and billing document tools for verification. mcp__zuora-mcp__ask_zuora is allowed only as a fallback for a specific IS capability or accounting-semantics question that remains after references and codegen are checked. If business intent is unclear, ask the user to choose the intended mapping before changing code.
Understand which code modifications are needed. Ask the user:
/zuora-is-migration-design? If so, share the key findings about which legacy APIs need to be updated."/zuora-is-migration-design codebase=/path first to inventory the codeKey principle: Modify existing methods to use Credit Memo APIs — do NOT create new methods.
Process:
Grep to find all SOAP calls to: InvoiceAdjustment / InvoiceItemAdjustment / CreditBalanceAdjustment in the codebasecreateInvoiceAdjustment() body from SOAP to REST, but keep the same method signatureWhat NOT to do:
createCreditMemo() as a new method alongside existing createInvoiceAdjustment()CreditMemoRestServiceValidation and reconciliation:
Modify existing methods, do NOT introduce new ones:
InvoiceAdjustmentService.createAdjustment() changes from SOAP to REST internally, but external callers see no differenceDetermine the correct API class before writing any code:
zuora_codegen list_api_classes to find the relevant API classzuora_codegen get_class_apis to list available methods in that classcode_guidance → get_api_details → get_model_details → code_rulesUse Zuora SDK for REST calls:
com.zuora.model.* classes for request/response objectscom.zuora.api.CreditmemosApi (or similar) from SDKHandle SOAP→REST transition:
Code organization:
*RestTest classes).java extension)When multiple IS APIs could apply — ask before coding
Some legacy operations (e.g., CreditBalanceAdjustment, InvoiceItemAdjustment) can be migrated to more than one IS API, each with a different business meaning. Do NOT pick silently. When you are unsure which IS API matches the business intent of the original code, ask the user.
For example, a method that reduces an invoice balance could map to:
PUT /v1/creditmemos/{id}/apply — if an existing Credit Memo is being appliedPUT /v1/invoices/{invoiceKey}/write-off — if a new write-off Credit Memo should be created and applied atomicallyThese have different accounting implications. Present the options and their business meanings to the user and wait for confirmation before writing any code.
Apply this principle any time you identify ambiguity, not just for write-off scenarios.
Write to files:
Run this step only when the migration plan (or the user) indicates DW requirements exist.
Read ${CLAUDE_PLUGIN_ROOT}/references/is-migration-dw-patterns.md before generating any SQL.
If the user has not already provided their DW SQL/models, ask:
"Please share the SQL queries or model files that reference legacy Zuora settlement objects (InvoicePayment, RefundInvoicePayment, CreditBalanceAdjustment, InvoiceAdjustment, InvoiceItemAdjustment). You can paste the SQL directly, provide file paths, or point to your dbt project directory."
Also ask or confirm:
STOP. Wait for the answers before producing SQL.
For each SQL file or query provided:
InvoicePayment, RefundInvoicePayment, CreditBalanceAdjustment, InvoiceAdjustment, InvoiceItemAdjustment{{ ref() }}, schema.table, view names, etc.)is-migration-dw-patterns.md)Apply the correct pattern from is-migration-dw-patterns.md based on sync mode:
Incremental sync:
InvoicePayment CTEs with PaymentApplication (Pattern 1)RefundInvoicePayment CTEs with RefundApplication (Pattern 2)CreditBalanceAdjustment, InvoiceAdjustment, InvoiceItemAdjustment unchanged (historical pre-IS records)CreditMemo/CreditMemoItem (Pattern 4) and DebitMemo/DebitMemoItem (Pattern 5)stg_zuora__* refs with their actual table names if not using dbt)Full historical sync:
CreditBalanceAdjustment as-is — no IS equivalent (Pattern 8)CreditMemo and DebitMemo (Patterns 4 and 5)Mixed sync mode:
Adapt to the customer's DW tooling:
{{ ref('stg_zuora__<object>') }} syntax, preserve model structure and CTE style<schema>.<table> notation matching their warehouse; omit dbt macrosstg_zuora__*CreditMemo and DebitMemo have no pre-IS equivalent — these are entirely additive. For each:
transaction_amount; DebitMemo items default to positiveWrite each rewritten query to a file named <original_filename>_is_rewrite.sql (or update in-place if the user prefers). Include inline comments marking every IS change (use the -- IS: comment prefix convention from is-migration-dw-patterns.md).
At the end of this step, produce a summary table:
| Original model | Legacy objects replaced | IS objects used | Sync pattern applied | New file |
|---|---|---|---|---|
| [model name] | InvoicePayment | PaymentApplication | Incremental | [filename] |
| ... |
Also list any net-new models created for CreditMemo / DebitMemo.
Output a checklist the customer can use before deploying:
payment_application, credit_memo, debit_memo, refund_application tablesCOUNT(*) on the union result vs each side separately)CreditMemo / DebitMemo objects in DW sync tool if not already presentRead these references to ensure generated code follows established patterns:
${CLAUDE_PLUGIN_ROOT}/references/is-migration-patterns.md — phases, object mappings, API operations for Credit Memos / Debit Memos${CLAUDE_PLUGIN_ROOT}/references/is-migration-api-reference.md — field-level mappings for legacy adjustments → Credit Memo objects${CLAUDE_PLUGIN_ROOT}/references/best-practices.md — API integration standards${CLAUDE_PLUGIN_ROOT}/references/is-migration-dw-patterns.md — DW object mapping, sync mode patterns, SQL examples, and pitfalls (read when DW requirements exist)mcp__zuora-mcp__get_account_summary to verify account state after Credit Memo conversionmcp__zuora-mcp__manage_billing_documents to verify Credit Memo and Debit Memo generation/zuora-validate on generated codeProduce Credit Memos / Debit Memos migration strategy, code inventory, and phases
This skill should be used when the user mentions "Zuora API", "Zuora SDK", "Zuora Billing", "Zuora Revenue", "Zuora CPQ", "Zuora Payments", "subscription billing", "invoice settlement", "zuora-mcp", "rate plan", "product rate plan charge", "order API", or discusses integration with Zuora systems. Do not activate for generic billing or subscription discussions that are not Zuora-specific.
Compose an importable Zuora Workflow JSON from a design or requirement
Design a Zuora Workflow-based solution
Generate legacy Zuora CPQ Apex, Visualforce, Component Library, zQuoteUtil, controller extension, or plugin-interface artifacts directly into a Salesforce DX repo
Design legacy Zuora CPQ Apex, Component Library, Visualforce, zQuoteUtil global method, controller extension, or plugin-interface customizations