# Zuora

> Run subscription billing on Zuora from workflows: add customer accounts, subscribe them to your catalog, add or remove products, renew, suspend, resume and cancel subscriptions, invoice now, email invoices, record payments and usage. Start a workflow when an account, subscription, order, invoice, payment or refund changes.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/zuora

## Actions

### Add product to subscription

Add a rate plan from your catalog to a subscription, such as an add-on or an upgrade.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- Rate plan (`rate_plan`, text, required): The product rate plan, from your catalog. Pick one, or give its ID from List products.
- Effective date (`effective_date`, date): When the change takes effect. Leave blank for today.
- Invoice now (`invoice_now`, true/false): Make the invoice for this change straight away, instead of at the next bill run. Default: `false`.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Cancel subscription

Cancel a subscription at the end of its term, at the end of the period already invoiced, or on a date. Cancelling before the end of an invoiced period makes a credit for the unused part.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- When (`when`, text): When the cancellation takes effect. One of: `EndOfCurrentTerm` (At the end of the current term), `EndOfLastInvoicePeriod` (At the end of the period already invoiced), `SpecificDate` (On a date). Default: `EndOfCurrentTerm`.
- Cancel on (`cancel_date`, date): The day it ends, when you chose On a date. Leave blank for today.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Create account

Add a customer account with its bill-to contact, ready for subscriptions. Auto-pay starts off, since it needs a payment method.

**Inputs**

- Account name (`name`, text, required): The customer's name.
- Currency (`currency`, text, required): The account's three-letter currency code, one your Zuora bills in, such as USD.
- Contact first name (`first_name`, text, required): The bill-to contact's first name.
- Contact last name (`last_name`, text, required): The bill-to contact's last name.
- Contact email (`email`, text): The bill-to contact's work email.
- Contact phone (`phone`, text): The bill-to contact's work phone.
- Address (`address`, text): The bill-to address's first line.
- City (`city`, text): The bill-to city.
- State or province (`state`, text): The bill-to state or province, by name or code, such as CA.
- Postal code (`postal_code`, text): The bill-to postal or ZIP code.
- Country (`country`, text): The bill-to country, by name or code, such as United States or USA.
- Account number (`account_number`, text): A number of your own for it. Leave blank and Zuora numbers it.
- Bill cycle day (`bill_cycle_day`, number): The day of the month it is billed, 1 to 31 (31 is the end of the month). Leave blank and Zuora sets it from the first subscription. From 0 to 31.
- Payment term (`payment_term`, text): The payment term as your Zuora names it, such as Net 30 or Due Upon Receipt. Leave blank for your default.
- CRM ID (`crm_id`, text): The account's ID in your CRM, such as Salesforce.
- Notes (`notes`, text): Notes on the account.
- Email invoices (`email_invoices`, true/false): Email the bill-to contact its invoices. Default: `false`.
- Custom fields (`custom_fields`, object): Custom fields your tenant added to accounts, by their API name, such as {"Region__c": "West"}. Find the names in Zuora under Settings > Billing > Manage Custom Fields, or in Object Manager.

**Outputs**

- `account_number` (text): The new account's number, such as A00000001
- `bill_to_contact_id` (text): The bill-to contact's ID
- `currency` (text): Its currency
- `id` (text): The new account's ID
- `name` (text): Its name
- `sold_to_contact_id` (text): The sold-to contact's ID

**Example output**

```json
{
  "account_number": "A00000214",
  "bill_to_contact_id": "8ad087d2909293cb019096417222099b",
  "currency": "USD",
  "id": "8ad087d2909293cb0190964171da0999",
  "name": "Bella Lawrence",
  "sold_to_contact_id": "8ad087d2909293cb01909641723e099e"
}
```

### Create subscription

Subscribe a customer account to one or more rate plans from your catalog, for a fixed term or ongoing. Zuora makes it through an order.

**Inputs**

- Account (`account`, text, required): The customer account's number, such as A00000001, or its ID, from another Zuora step or the trigger.
- Rate plans (`rate_plans`, list, required): The product rate plans to subscribe to. Pick them, or give IDs from List products.
- Start date (`start_date`, date): When it starts and billing begins. Leave blank for today.
- Term (`term_type`, text): A fixed term that ends or renews, or ongoing until cancelled. One of: `TERMED` (A fixed term), `EVERGREEN` (Ongoing (evergreen)). Default: `TERMED`.
- Term length (`term_length`, number): How long each term lasts, in the term unit. Defaults to 12. Not used for an ongoing subscription. From 1 to 1200. Default: `12`.
- Term unit (`term_period`, text): What the term length counts. One of: `Month` (Months), `Year` (Years), `Week` (Weeks), `Day` (Days). Default: `Month`.
- Renew automatically (`auto_renew`, true/false): Renew for another term at the end of each term. Not used for an ongoing subscription. Default: `true`.
- Notes (`notes`, text): Notes on the subscription, up to 500 characters.
- Invoice now (`invoice_now`, true/false): Make the invoice for this change straight away, instead of at the next bill run. Default: `false`.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Delete account

Delete a customer account with everything on it: subscriptions, invoices, payments and usage. Zuora does it in the background and the account ends up Canceled. This can't be undone.

**Inputs**

- Account (`account`, text, required): The customer account's number, such as A00000001, or its ID, from another Zuora step or the trigger.

**Outputs**

- `deleted` (true/false): True once Zuora accepted the deletion
- `id` (text): The deleted account's ID
- `job_id` (text): The ID of Zuora's background job doing the deletion
- `job_status` (text): The job's status when it was accepted, such as Pending

**Example output**

```json
{
  "deleted": true,
  "id": "40288ae9600808280160081dc9c13f15",
  "job_id": "40288ae9600808280160081db1533506",
  "job_status": "Pending"
}
```

### Email invoice

Email a posted invoice to its bill-to contact, or to the addresses you give. Zuora's Manual Email For Invoice notification must be on.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's number, such as INV00000001, or its ID, from another Zuora step or the trigger.
- Send to (`email_addresses`, text): Email addresses separated by commas. Leave blank to send it to the account's bill-to contact.
- Also the account's other addresses (`include_additional_emails`, true/false): Also send it to the additional email addresses on the account. Default: `false`.

**Outputs**

- `invoice` (text): The invoice as you named it, by its number or ID
- `sent` (true/false): True once Zuora accepted the email
- `sent_to` (text): Who it went to: the addresses given, or the bill-to contact

**Example output**

```json
{
  "invoice": "INV00000255",
  "sent": true,
  "sent_to": "amy.lawrence@zuora.com"
}
```

### Find accounts

Find customer accounts by name, number, contact email or CRM ID, latest change first. Leave every field blank to list the latest.

**Inputs**

- Name starts with (`name`, text): The start of the account's name.
- Account number (`account_number`, text): The exact account number.
- Contact email (`email`, text): An email any of its contacts has, work or personal.
- CRM ID (`crm_id`, text): The account's ID in your CRM.
- Status (`status`, list): Only accounts in these statuses. One or more of: `Active`, `Draft`, `Canceled`.
- Currency (`currency`, text): Only accounts in this currency, such as USD.
- Changed since (`updated_since`, date and time): Only accounts changed at or after this time.
- How many (`limit`, number): The most to list. Defaults to 25, at most 200. From 1 to 200.

**Outputs**

- `accounts` (list): The accounts found
- `count` (number): How many are listed
- `has_more` (true/false): True if more match than were listed

**Example output**

```json
{
  "accounts": [
    {
      "account_number": "A00000130",
      "address": "101 Redwood Shores Pkwy",
      "auto_pay": false,
      "balance": 7300,
      "bill_cycle_day": 1,
      "bill_to_email": "amy.lawrence@zuora.com",
      "bill_to_first_name": "Amy",
      "bill_to_last_name": "Lawrence",
      "bill_to_phone": "",
      "city": "Redwood City",
      "country": "United States",
      "created_at": "2024-11-10T17:35:45-08:00",
      "credit_balance": 0,
      "crm_id": "",
      "currency": "USD",
      "custom_fields": {},
      "id": "8ad08eb292f6328c019318dcd43821b0",
      "last_invoice_date": "2025-03-21",
      "mrr": 2950,
      "name": "Bella Lawrence",
      "notes": "",
      "payment_term": "Net 30",
      "postal_code": "",
      "state": "California",
      "status": "Active",
      "total_invoice_balance": 7300,
      "updated_at": "2025-03-21T03:24:15-07:00"
    }
  ],
  "count": 1,
  "has_more": false
}
```

### Find invoices

Find invoices by account, status, invoice date, or only unpaid or overdue ones, newest first.

**Inputs**

- Account (`account`, text): Only this customer account's invoices, by its number or ID.
- Status (`status`, list): Only invoices in these statuses. One or more of: `Posted`, `Draft`, `Canceled`.
- Unpaid only (`unpaid_only`, true/false): Only invoices with something left to pay. Default: `false`.
- Overdue only (`overdue_only`, true/false): Only posted invoices past their due date with something left to pay. Default: `false`.
- Dated from (`invoice_date_from`, date): Only invoices dated on or after this day.
- Dated to (`invoice_date_to`, date): Only invoices dated on or before this day.
- How many (`limit`, number): The most to list. Defaults to 25, at most 200. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `has_more` (true/false): True if more match than were listed
- `invoices` (list): The invoices found

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "invoices": [
    {
      "account_id": "8ad08eb292f6328c019318dcd43821b0",
      "account_name": "Bella Lawrence",
      "account_number": "A00000130",
      "amount": 7300,
      "amount_without_tax": 7300,
      "balance": 7300,
      "comments": "",
      "created_at": "2025-03-21T01:42:47-07:00",
      "currency": "USD",
      "custom_fields": {},
      "due_date": "2025-04-20",
      "id": "8ad0875995aa292e0195b7de80796305",
      "invoice_date": "2025-03-21",
      "invoice_number": "INV00000255",
      "payment_amount": 0,
      "posted_date": "2025-03-21T01:42:47-07:00",
      "status": "Posted",
      "target_date": "2025-03-21",
      "tax_amount": 0,
      "updated_at": "2025-03-21T01:42:47-07:00"
    }
  ]
}
```

### Find payments

Find payments by account, status or type, newest first. Leave every field blank to list the newest.

**Inputs**

- Account (`account`, text): Only this customer account's payments, by its number or ID.
- Status (`status`, list): Only payments in these statuses. One or more of: `Processed`, `Processing`, `Error` (Failed (Error)), `Canceled`.
- Type (`payment_type`, list): Only payments recorded from outside Zuora, or only ones charged through a payment gateway. One or more of: `External` (Recorded (external)), `Electronic` (Charged (electronic)).
- Made since (`created_since`, date and time): Only payments made at or after this time.
- How many (`limit`, number): The most to list. Defaults to 25, at most 200. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `has_more` (true/false): True if more match than were listed
- `payments` (list): The payments found

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "payments": [
    {
      "account_id": "8ad09be48db5aba7018db604776d4854",
      "account_name": "Bella Lawrence",
      "account_number": "A00000130",
      "amount": 14.99,
      "applied_amount": 14.99,
      "comment": "",
      "created_at": "2024-08-29T00:53:29-07:00",
      "currency": "USD",
      "effective_date": "2024-08-29",
      "gateway_response": "This transaction has been approved by Test gateway.",
      "gateway_state": "Submitted",
      "id": "8ad097b49198384c01919d200fb53143",
      "payment_number": "P-00000026",
      "reference_id": "3217674.800792635",
      "refund_amount": 0,
      "status": "Processed",
      "type": "Electronic",
      "unapplied_amount": 0,
      "updated_at": "2024-08-29T00:53:30-07:00"
    }
  ]
}
```

### Find subscriptions

Find subscriptions by account and status, latest change first. Leave every field blank to list the latest.

**Inputs**

- Account (`account`, text): Only this customer account's subscriptions, by its number or ID.
- Status (`status`, list): Only subscriptions in these statuses. One or more of: `Active`, `Cancelled`, `Suspended`, `Pending Activation`, `Pending Acceptance`, `Draft`.
- Changed since (`updated_since`, date and time): Only subscriptions changed at or after this time.
- How many (`limit`, number): The most to list. Defaults to 25, at most 200. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `has_more` (true/false): True if more match than were listed
- `subscriptions` (list): The subscriptions found

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "subscriptions": [
    {
      "account_id": "2c92c0f87270a5970172747e289a5e66",
      "account_name": "Bella Lawrence",
      "account_number": "A00000001",
      "auto_renew": true,
      "cancelled_date": "",
      "contract_effective_date": "2025-02-01",
      "created_at": "2025-03-25T06:26:14-07:00",
      "currency": "USD",
      "current_term": 12,
      "current_term_period": "Month",
      "custom_fields": {},
      "id": "f94fb52490e95cd65925cd7b737400bd",
      "initial_term": 12,
      "initial_term_period": "Month",
      "mrr": 2950,
      "notes": "",
      "order_id": "f94fb52490e95cd65925cd7b733100b6",
      "rate_plans": [
        {
          "id": "f94fb52490e95cd65925cd7b740200c7",
          "name": "Monthly rate plan",
          "product_id": "8ad08ea194da7ba00194df52a41f04c6",
          "product_rate_plan_id": "f94fbebf61e952182765223a7a1d0000",
          "rate_plan_number": "SRP-00000349",
          "removed": false
        }
      ],
      "renewal_term": 12,
      "renewal_term_period": "Month",
      "service_activation_date": "2025-02-01",
      "status": "Active",
      "subscription_end_date": "2026-02-01",
      "subscription_number": "A-S00000159",
      "subscription_start_date": "2025-02-01",
      "term_end_date": "2026-02-01",
      "term_start_date": "2025-02-01",
      "term_type": "TERMED",
      "updated_at": "2025-03-25T06:26:14-07:00",
      "version": 1
    }
  ]
}
```

### Get account

Get a customer account with its balance, monthly recurring revenue and bill-to contact.

**Inputs**

- Account (`account`, text, required): The customer account's number, such as A00000001, or its ID, from another Zuora step or the trigger.

**Outputs**

- `account_number` (text): The account's number, such as A00000001
- `address` (text): The bill-to address's first line
- `auto_pay` (true/false): True if payments are collected automatically
- `balance` (number): What the customer owes on invoices and debit memos
- `bill_cycle_day` (number): The day of the month the account is billed; 0 if Zuora sets it
- `bill_to_email` (text): The bill-to contact's work email, or personal email
- `bill_to_first_name` (text): The bill-to contact's first name
- `bill_to_last_name` (text): The bill-to contact's last name
- `bill_to_phone` (text): The bill-to contact's work phone, or mobile
- `city` (text): The bill-to city
- `country` (text): The bill-to country
- `created_at` (text): When it was added to Zuora (ISO 8601)
- `credit_balance` (number): The account's credit balance
- `crm_id` (text): The account's ID in your CRM
- `currency` (text): The account's currency, such as USD
- `custom_fields` (object): Custom fields your tenant added, by their API name (ending in __c)
- `id` (text): The account's ID
- `last_invoice_date` (text): When it was last invoiced (YYYY-MM-DD)
- `mrr` (number): Monthly recurring revenue
- `name` (text): The account's name
- `notes` (text): Notes on the account
- `payment_term` (text): The payment term, such as Net 30
- `postal_code` (text): The bill-to postal code
- `state` (text): The bill-to state or province
- `status` (text): Active, Draft or Canceled
- `total_invoice_balance` (number): What the customer owes on invoices
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "account_number": "A00000130",
  "address": "101 Redwood Shores Pkwy",
  "auto_pay": false,
  "balance": 7300,
  "bill_cycle_day": 1,
  "bill_to_email": "amy.lawrence@zuora.com",
  "bill_to_first_name": "Amy",
  "bill_to_last_name": "Lawrence",
  "bill_to_phone": "",
  "city": "Redwood City",
  "country": "United States",
  "created_at": "2024-11-10T17:35:45-08:00",
  "credit_balance": 0,
  "crm_id": "",
  "currency": "USD",
  "custom_fields": {},
  "id": "8ad08eb292f6328c019318dcd43821b0",
  "last_invoice_date": "2025-03-21",
  "mrr": 2950,
  "name": "Bella Lawrence",
  "notes": "",
  "payment_term": "Net 30",
  "postal_code": "",
  "state": "California",
  "status": "Active",
  "total_invoice_balance": 7300,
  "updated_at": "2025-03-21T03:24:15-07:00"
}
```

### Get invoice

Get an invoice with its amount, what is still owed and its dates.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's number, such as INV00000001, or its ID, from another Zuora step or the trigger.

**Outputs**

- `account_id` (text): The customer account's ID
- `account_name` (text): The customer account's name
- `account_number` (text): The customer account's number, such as A00000001
- `amount` (number): Its total, with tax
- `amount_without_tax` (number): Its total before tax
- `balance` (number): What is still owed on it
- `comments` (text): Comments on the invoice
- `created_at` (text): When it was added to Zuora (ISO 8601)
- `currency` (text): Its currency, such as USD
- `custom_fields` (object): Custom fields your tenant added, by their API name (ending in __c)
- `due_date` (text): When it is due (YYYY-MM-DD)
- `id` (text): The invoice's ID
- `invoice_date` (text): The invoice date (YYYY-MM-DD)
- `invoice_number` (text): The invoice's number, such as INV00000255
- `payment_amount` (number): What has been paid on it
- `posted_date` (text): When it was posted (ISO 8601); empty while a draft
- `status` (text): Draft, Posted, Canceled or Error
- `target_date` (text): The date it billed charges up to (YYYY-MM-DD)
- `tax_amount` (number): The tax on it
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "account_id": "8ad08eb292f6328c019318dcd43821b0",
  "account_name": "Bella Lawrence",
  "account_number": "A00000130",
  "amount": 7300,
  "amount_without_tax": 7300,
  "balance": 7300,
  "comments": "",
  "created_at": "2025-03-21T01:42:47-07:00",
  "currency": "USD",
  "custom_fields": {},
  "due_date": "2025-04-20",
  "id": "8ad0875995aa292e0195b7de80796305",
  "invoice_date": "2025-03-21",
  "invoice_number": "INV00000255",
  "payment_amount": 0,
  "posted_date": "2025-03-21T01:42:47-07:00",
  "status": "Posted",
  "target_date": "2025-03-21",
  "tax_amount": 0,
  "updated_at": "2025-03-21T01:42:47-07:00"
}
```

### Get payment

Get a payment with how much of it is applied, unapplied and refunded.

**Inputs**

- Payment (`payment`, text, required): The payment's number, such as P-00000001, or its ID, from another Zuora step or the trigger.

**Outputs**

- `account_id` (text): The customer account's ID
- `account_name` (text): The customer account's name
- `account_number` (text): The customer account's number, such as A00000001
- `amount` (number): How much was paid
- `applied_amount` (number): How much of it is applied to invoices
- `comment` (text): The note on it
- `created_at` (text): When it was added to Zuora (ISO 8601)
- `currency` (text): Its currency, such as USD
- `effective_date` (text): When it took effect (YYYY-MM-DD)
- `gateway_response` (text): What the payment gateway said
- `gateway_state` (text): Where the payment gateway is with it, such as Submitted
- `id` (text): The payment's ID
- `payment_number` (text): The payment's number, such as P-00000026
- `reference_id` (text): The payment gateway's reference for it
- `refund_amount` (number): How much of it was refunded
- `status` (text): Processed, Processing, Error, Canceled, Draft or Posted
- `type` (text): External (recorded) or Electronic (charged through a gateway)
- `unapplied_amount` (number): How much of it is not applied yet
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "account_id": "8ad09be48db5aba7018db604776d4854",
  "account_name": "Bella Lawrence",
  "account_number": "A00000130",
  "amount": 14.99,
  "applied_amount": 14.99,
  "comment": "",
  "created_at": "2024-08-29T00:53:29-07:00",
  "currency": "USD",
  "effective_date": "2024-08-29",
  "gateway_response": "This transaction has been approved by Test gateway.",
  "gateway_state": "Submitted",
  "id": "8ad097b49198384c01919d200fb53143",
  "payment_number": "P-00000026",
  "reference_id": "3217674.800792635",
  "refund_amount": 0,
  "status": "Processed",
  "type": "Electronic",
  "unapplied_amount": 0,
  "updated_at": "2024-08-29T00:53:30-07:00"
}
```

### Get subscription

Get a subscription's latest version: its status, term, dates, monthly recurring revenue and rate plans.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.

**Outputs**

- `account_id` (text): The customer account's ID
- `account_name` (text): The customer account's name
- `account_number` (text): The customer account's number, such as A00000001
- `auto_renew` (true/false): True if it renews by itself at the end of the term
- `cancelled_date` (text): When the cancellation takes effect (YYYY-MM-DD); empty if not cancelled
- `contract_effective_date` (text): When the contract took effect (YYYY-MM-DD)
- `created_at` (text): When the subscription was first created (ISO 8601)
- `currency` (text): Its currency, such as USD
- `current_term` (number): How long the current term is
- `current_term_period` (text): Month, Year, Week or Day
- `custom_fields` (object): Custom fields your tenant added, by their API name (ending in __c)
- `id` (text): This version's ID
- `initial_term` (number): How long the first term is
- `initial_term_period` (text): Month, Year, Week or Day
- `mrr` (number): Its monthly recurring revenue
- `notes` (text): Notes on the subscription
- `order_id` (text): The order that made this version
- `rate_plans` (list): The rate plans (products) on it
- `renewal_term` (number): How long each renewal term is
- `renewal_term_period` (text): Month, Year, Week or Day
- `service_activation_date` (text): When the service started (YYYY-MM-DD)
- `status` (text): Active, Cancelled, Suspended, Pending Activation, Pending Acceptance or Draft
- `subscription_end_date` (text): When it ends (YYYY-MM-DD); empty if it doesn't
- `subscription_number` (text): The subscription's number, such as A-S00000001
- `subscription_start_date` (text): When the subscription started (YYYY-MM-DD)
- `term_end_date` (text): When the current term ends (YYYY-MM-DD)
- `term_start_date` (text): When the current term started (YYYY-MM-DD)
- `term_type` (text): TERMED (a fixed term) or EVERGREEN (ongoing)
- `updated_at` (text): When it last changed (ISO 8601)
- `version` (number): Its version; each change adds one

**Example output**

```json
{
  "account_id": "2c92c0f87270a5970172747e289a5e66",
  "account_name": "Bella Lawrence",
  "account_number": "A00000001",
  "auto_renew": true,
  "cancelled_date": "",
  "contract_effective_date": "2025-02-01",
  "created_at": "2025-03-25T06:26:14-07:00",
  "currency": "USD",
  "current_term": 12,
  "current_term_period": "Month",
  "custom_fields": {},
  "id": "f94fb52490e95cd65925cd7b737400bd",
  "initial_term": 12,
  "initial_term_period": "Month",
  "mrr": 2950,
  "notes": "",
  "order_id": "f94fb52490e95cd65925cd7b733100b6",
  "rate_plans": [
    {
      "id": "f94fb52490e95cd65925cd7b740200c7",
      "name": "Monthly rate plan",
      "product_id": "8ad08ea194da7ba00194df52a41f04c6",
      "product_rate_plan_id": "f94fbebf61e952182765223a7a1d0000",
      "rate_plan_number": "SRP-00000349",
      "removed": false
    }
  ],
  "renewal_term": 12,
  "renewal_term_period": "Month",
  "service_activation_date": "2025-02-01",
  "status": "Active",
  "subscription_end_date": "2026-02-01",
  "subscription_number": "A-S00000159",
  "subscription_start_date": "2025-02-01",
  "term_end_date": "2026-02-01",
  "term_start_date": "2025-02-01",
  "term_type": "TERMED",
  "updated_at": "2025-03-25T06:26:14-07:00",
  "version": 1
}
```

### Invoice account now

Make the invoices a customer account is due now, without waiting for a bill run, as drafts or posted.

**Inputs**

- Account (`account`, text, required): The customer account's number, such as A00000001, or its ID, from another Zuora step or the trigger.
- Bill up to (`target_date`, date): Invoice charges due up to this day. Leave blank for today.
- Post them (`post_now`, true/false): Post the invoices straight away, instead of leaving them as drafts to check. Default: `false`.

**Outputs**

- `count` (number): How many invoices were made
- `credit_memo_ids` (list): The IDs of any credit memos made
- `invoice_ids` (list): The IDs of the invoices made

**Example output**

```json
{
  "count": 1,
  "credit_memo_ids": [],
  "invoice_ids": [
    "8ad084db909fae930190a121c84957ff"
  ]
}
```

### List products

List the products in your catalog with their rate plans and the IDs Create subscription and Add product take.

**Inputs**

- Name starts with (`name`, text): Only products whose name starts with this.
- Include expired (`include_expired`, true/false): Also list products and rate plans no longer on sale. Default: `false`.
- How many (`limit`, number): The most products to list. Defaults to 100, at most 500. From 1 to 500.

**Outputs**

- `count` (number): How many products are listed
- `has_more` (true/false): True if more products match than were listed
- `products` (list): The products in your catalog
- `rate_plans` (list): Every rate plan listed, with its product, ready for Create subscription

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "products": [
    {
      "category": "",
      "description": "Cloud Service provided by ACME Corp.",
      "effective_end_date": "2032-10-20",
      "effective_start_date": "2022-10-20",
      "id": "8ad08ea194da7ba00194df52a41f04c6",
      "name": "Cloud Service",
      "product_number": "PC-00000027",
      "rate_plans": [
        {
          "description": "",
          "effective_end_date": "2028-02-08",
          "effective_start_date": "2025-02-01",
          "id": "f94fbebf61e952182765223a7a1d0000",
          "name": "Premium plan - Monthly",
          "product_id": "8ad08ea194da7ba00194df52a41f04c6",
          "product_name": "Cloud Service",
          "product_rate_plan_number": "PRP-00000037"
        }
      ],
      "sku": "SKU-001"
    }
  ],
  "rate_plans": [
    {
      "description": "",
      "effective_end_date": "2028-02-08",
      "effective_start_date": "2025-02-01",
      "id": "f94fbebf61e952182765223a7a1d0000",
      "name": "Premium plan - Monthly",
      "product_id": "8ad08ea194da7ba00194df52a41f04c6",
      "product_name": "Cloud Service",
      "product_rate_plan_number": "PRP-00000037"
    }
  ]
}
```

### Post invoice

Post a draft invoice, so it can be sent to the customer and paid.

**Inputs**

- Invoice (`invoice`, text, required): The invoice's number, such as INV00000001, or its ID, from another Zuora step or the trigger.

**Outputs**

- `id` (text): The invoice's ID
- `posted` (true/false): True once Zuora posted it

**Example output**

```json
{
  "id": "8ad0875995aa292e0195b7de80796305",
  "posted": true
}
```

### Record payment

Record a payment received outside Zuora, such as a check or a wire, and apply it to an invoice. Nothing is charged. Without an invoice it stays on the account, unapplied.

**Inputs**

- Amount (`amount`, number, required): How much was paid, such as 49.99, in the invoice's or account's currency. Any part over what the invoice owes stays unapplied. At least 0.01.
- Invoice (`invoice`, text): The invoice it pays, by number or ID. Leave blank and give the account for a payment not applied yet.
- Account (`account`, text): The customer account, by its number or ID, when no invoice is given.
- Paid by (`method`, text): How the customer paid. The method must be turned on in your Zuora payment settings. One of: `Check`, `Cash`, `WireTransfer` (Wire transfer), `BankTransfer` (Bank transfer), `Other`. Default: `Check`.
- Note (`comment`, text): A note on the payment, such as the check number.

**Outputs**

- `account_id` (text): The customer account's ID
- `account_name` (text): The customer account's name
- `account_number` (text): The customer account's number, such as A00000001
- `amount` (number): How much was paid
- `applied_amount` (number): How much of it is applied to invoices
- `comment` (text): The note on it
- `created_at` (text): When it was added to Zuora (ISO 8601)
- `currency` (text): Its currency, such as USD
- `effective_date` (text): When it took effect (YYYY-MM-DD)
- `gateway_response` (text): What the payment gateway said
- `gateway_state` (text): Where the payment gateway is with it, such as Submitted
- `id` (text): The payment's ID
- `payment_number` (text): The payment's number, such as P-00000026
- `reference_id` (text): The payment gateway's reference for it
- `refund_amount` (number): How much of it was refunded
- `status` (text): Processed, Processing, Error, Canceled, Draft or Posted
- `type` (text): External (recorded) or Electronic (charged through a gateway)
- `unapplied_amount` (number): How much of it is not applied yet
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "account_id": "8a90b4488e7d5c0f018e7db3892400b2",
  "account_name": "",
  "account_number": "A00000370",
  "amount": 14.99,
  "applied_amount": 14.99,
  "comment": "",
  "created_at": "2024-08-13 17:55:22",
  "currency": "USD",
  "effective_date": "2024-08-13",
  "gateway_response": "",
  "gateway_state": "NotSubmitted",
  "id": "8a90a04d914ac24801914b29e47f0777",
  "payment_number": "P-00000389",
  "reference_id": "",
  "refund_amount": 0,
  "status": "Processed",
  "type": "External",
  "unapplied_amount": 0,
  "updated_at": "2024-08-13 17:55:22"
}
```

### Record usage

Record how much a customer used, such as minutes or API calls, for a usage charge on their subscription to bill.

**Inputs**

- Account (`account`, text, required): The customer account's number, such as A00000001, or its ID, from another Zuora step or the trigger.
- Quantity (`quantity`, number, required): How many units were used, such as 120. At least 0.
- Unit of measure (`unit`, text, required): The unit as your Zuora names it, such as Each or Minutes. It must match the usage charge's unit.
- Subscription (`subscription`, text): The subscription's number, such as A-S00000001. Leave blank to record it on the account.
- Used at (`start_at`, date and time): When the usage happened; this decides the period it is billed in. Leave blank for now.
- Used until (`end_at`, date and time): When the usage ended, for your records.
- Charge number (`charge_number`, text): The usage charge's number on the subscription, such as C-00000007, when it has more than one.
- Description (`description`, text): A description of the usage, up to 200 characters.

**Outputs**

- `account` (text): The account it was recorded on
- `id` (text): The usage record's ID
- `quantity` (number): How many units
- `start_at` (text): When the usage started (ISO 8601)
- `subscription_number` (text): The subscription it was recorded on; empty if none
- `unit` (text): The unit of measure

**Example output**

```json
{
  "account": "A00000130",
  "id": "8ad08ae29085a77b0190908bfdd67abb",
  "quantity": 200,
  "start_at": "2024-06-01T01:00:00.000+00:00",
  "subscription_number": "A-S00000159",
  "unit": "Minutes"
}
```

### Remove product from subscription

Take a rate plan off a subscription, named by the catalog rate plan it came from or its ID on the subscription.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- Rate plan (`rate_plan`, text, required): The rate plan to take off. Pick the catalog rate plan, or give a rate plan ID from Get subscription.
- Effective date (`effective_date`, date): When the change takes effect. Leave blank for today.
- Invoice now (`invoice_now`, true/false): Make the invoice for this change straight away, instead of at the next bill run. Default: `false`.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Renew subscription

Renew a fixed-term subscription for another term now, without waiting for the end of this one.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- Invoice now (`invoice_now`, true/false): Make the invoice for this change straight away, instead of at the next bill run. Default: `false`.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Resume subscription

Start a suspended subscription again, today or on a date.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- When (`when`, text): When billing starts again. One of: `Today`, `SpecificDate` (On a date). Default: `Today`.
- Resume on (`resume_date`, date): The day it resumes, when you chose On a date. Leave blank for today.
- Extend the term (`extend_term`, true/false): Add the time it was suspended to the end of the term. Default: `false`.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Suspend subscription

Pause a subscription: billing stops until it is resumed.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- When (`when`, text): When the suspension starts. One of: `Today`, `EndOfLastInvoicePeriod` (At the end of the period already invoiced), `SpecificDate` (On a date). Default: `Today`.
- Suspend on (`suspend_date`, date): The day it is suspended, when you chose On a date. Leave blank for today.

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Turn auto-renew on or off

Choose whether a fixed-term subscription renews by itself at the end of its term.

**Inputs**

- Subscription (`subscription`, text, required): The subscription's number, such as A-S00000001, from another Zuora step or the trigger.
- Auto-renew (`auto_renew`, text, required): Turn it on or off. One of: `on` (Turn auto-renew on), `off` (Turn auto-renew off).

**Outputs**

- `account_number` (text): The account the order is on
- `invoice_numbers` (list): Invoices the order produced, if it was asked to invoice
- `order_number` (text): The order that made the change, such as O-00000354
- `status` (text): The order's status: Completed, or Pending if Zuora waits on a date
- `subscription_number` (text): The subscription it changed or created
- `subscription_status` (text): The subscription's status after the change

**Example output**

```json
{
  "account_number": "A00000097",
  "invoice_numbers": [],
  "order_number": "O-00000354",
  "status": "Completed",
  "subscription_number": "A-S00000129",
  "subscription_status": "Active"
}
```

### Update account

Change a customer account and its bill-to contact. Fields left blank keep what they have. Giving an email turns on emailed invoices.

**Inputs**

- Account (`account`, text, required): The customer account's number, such as A00000001, or its ID, from another Zuora step or the trigger.
- Account name (`name`, text): A new name for the account.
- Contact first name (`first_name`, text): The bill-to contact's first name.
- Contact last name (`last_name`, text): The bill-to contact's last name.
- Contact email (`email`, text): The bill-to contact's work email.
- Contact phone (`phone`, text): The bill-to contact's work phone.
- Address (`address`, text): The bill-to address's first line.
- City (`city`, text): The bill-to city.
- State or province (`state`, text): The bill-to state or province, by name or code, such as CA.
- Postal code (`postal_code`, text): The bill-to postal or ZIP code.
- Country (`country`, text): The bill-to country, by name or code, such as United States or USA.
- Bill cycle day (`bill_cycle_day`, number): The day of the month it is billed, 1 to 31. From 1 to 31.
- Payment term (`payment_term`, text): The payment term as your Zuora names it, such as Net 30 or Due Upon Receipt. Leave blank for your default.
- CRM ID (`crm_id`, text): The account's ID in your CRM, such as Salesforce.
- Notes (`notes`, text): Notes on the account.
- Custom fields (`custom_fields`, object): Custom fields your tenant added to accounts, by their API name, such as {"Region__c": "West"}. Find the names in Zuora under Settings > Billing > Manage Custom Fields, or in Object Manager.

**Outputs**

- `account` (text): The account as you named it, by its number or ID
- `fields` (list): The fields that were sent
- `updated` (true/false): True once Zuora saved the change

**Example output**

```json
{
  "account": "A00000130",
  "fields": [
    "crm_id",
    "notes"
  ],
  "updated": true
}
```
