بنقرة واحدة
zuora-is-migration-design
Produce Credit Memos / Debit Memos migration strategy, code inventory, and phases
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Produce Credit Memos / Debit Memos migration strategy, code inventory, and phases
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Generate Credit Memos / Debit Memos migration implementation artifacts based on the plan
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
| name | zuora-is-migration-design |
| description | Produce Credit Memos / Debit Memos migration strategy, code inventory, and phases |
| argument-hint | ["codebase path and migration context"] |
| allowed-tools | ["Read","Write","Glob","Grep","Bash","Agent","AskUserQuestion","Skill","mcp__zuora-mcp__ask_zuora","mcp__zuora-mcp__query_objects","mcp__zuora-mcp__zuora_codegen","mcp__zuora-mcp__get_account_summary"] |
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 producing a Credit Memos / Debit Memos migration plan. This plan guides the migration from legacy invoice adjustments (InvoiceAdjustment, InvoiceItemAdjustment, CreditBalanceAdjustment) to the modern Credit Memo and Debit Memo APIs.
Resolve the codebase path before any analysis:
If $ARGUMENTS contains codebase=<path>, use that path directly and inform the user:
"Analyzing codebase at:
<resolved-path>"
If no path is provided, run pwd to get the current working directory, then ask:
"No codebase path was provided. I will use the current working directory:
<pwd-result>Is this correct, or would you like to specify a different path? (press Enter to confirm, or type the path)"
STOP. Wait for the user to confirm or provide a path before continuing.
Do NOT proceed with any analysis until the path is confirmed.
The user's migration context and codebase path: $ARGUMENTS
Expected format: codebase=/path/to/billing-client or codebase=/path/to/billing-client context:tenant is production with 500 accounts
Use local code search and bundled IS references for code inventory, legacy API detection, mapping tables, and migration-plan structure. Use mcp__zuora-mcp__zuora_codegen for API details and model requirements, mcp__zuora-mcp__query_objects / mcp__zuora-mcp__get_account_summary for tenant state, and mcp__zuora-mcp__ask_zuora only when a specific IS capability, prerequisite, or accounting-semantics question remains unresolved after those sources.
When unsure about any aspect of the migration analysis, do NOT guess — list the uncertain items and ask the user before proceeding.
Gather context about the tenant's current state:
mcp__zuora-mcp__ask_zuora for unresolved IS capability or prerequisite questions; prefer checking the bundled IS references and codegen first when they are likely to have the answer.mcp__zuora-mcp__query_objects to inspect:
Use mcp__zuora-mcp__get_account_summary on a few representative accounts to understand the current billing structure.
Search the codebase (at the path provided) for usage of legacy adjustment APIs:
Grep to find references to: InvoiceAdjustment, InvoiceItemAdjustment, CreditBalanceAdjustmentWhen reading legacy code, method names and existing comments are the source of truth for intent. The implementation may have used a different or incorrect API due to legacy limitations.
For each legacy adjustment call site found:
writeOffInvoice but the body uses CreditBalanceAdjustment type=Decrease, which is a credit-apply operation, not a write-off):
"Method
writeOffInvoiceusesCreditBalanceAdjustment type=Decreasein its implementation, but a write-off and a credit-apply are different IS operations:
- Write-off:
PUT /v1/invoices/{invoiceKey}/write-off- Apply existing credit memo:
PUT /v1/credit-memos/{creditMemoKey}/applyWhich is the correct IS mapping for this method?"
Ask the user about:
Use AskUserQuestion to ask the following two questions in a single call:
Question 1: "Does your system include a Data Warehouse or BI reporting layer that reads Zuora data? (e.g., dbt models, Fivetran/HVR pipelines, Looker, raw SQL reports, Snowflake/BigQuery views)"
STOP. Wait for the answer before continuing.
If the user answers No, skip the rest of Step 3b and proceed to Step 4.
If the user answers Yes, ask:
Question 2: "How does your DW pipeline sync Zuora data — incremental (only new/changed records each run) or full historical sync (full rebuild from scratch each run)?"
Record the DW sync mode. Then ask the user to share their existing SQL queries or model files that read from the following legacy Zuora objects (one or more may apply):
InvoicePayment / invoice_paymentRefundInvoicePayment / refund_invoice_paymentCreditBalanceAdjustment / credit_balance_adjustmentInvoiceAdjustment / invoice_adjustment or InvoiceItemAdjustmentTell the user: "You can paste the SQL directly, provide file paths, or describe which tables your models use. I will produce IS-compatible rewrites in the build phase."
Document everything collected here in the plan's DW section (see Step 7).
First, list all files under ${CLAUDE_PLUGIN_ROOT}/references/ to understand what is available. Then read every file that is relevant to Credit Memos, Debit Memos, Invoice Settlement, or the APIs being migrated — including is-migration-dw-patterns.md when DW requirements were identified in Step 3b. Do not hardcode file names — the contents of the references folder may change across versions.
Call mcp__zuora-mcp__zuora_codegen with get_api_details to understand REST API requirements for credit memos and debit memos.
Deliver a structured document with the codebase path prominently noted:
Executive summary: What Credit Memos / Debit Memos migration is, why it matters, scope, and timeline
Codebase inventory:
Current state assessment: Summary of tenant usage patterns, custom integrations, and downstream impacts
Migration phases:
// Before: CreditBalanceAdjustment type=Decrease via SOAP)// After: PUT /v1/invoices/{invoiceKey}/write-off)Risk matrix: For each risk — likelihood, impact, mitigation
Validation checklist: Code review points, integration test scenarios, edge cases
Dependencies and prerequisites: API version, Zuora SDK version, team skill with REST APIs
Data Warehouse section (include only when DW requirements were identified in Step 3b):
dim_transactions_creditmemo — reads CreditMemo + CreditMemoItemdim_transactions_debitmemo — reads DebitMemo + DebitMemoItempayment_application, credit_memo, debit_memo, refund_application tablesis-migration-dw-patterns.md)After completing the plan:
Present the full plan to the user
Write the plan to plan.md in the codebase root (or current working directory)
Use the AskUserQuestion tool to ask:
plan.md. Do you want to proceed with implementation?"STOP. Do NOT continue until the user answers.
Skill tool with skill: "zuora-coding-agent:zuora-is-migration-build"./zuora-is-migration-build manually when ready.