Authentication

Leapfin uses OAuth to connect with Zuora. To establish the connection, you need to create an OAuth client for Leapfin in your Zuora account.

Step 1: Log into Zuora account. Click the username at the top right and navigate to Administration > Manage Users.

Step 2: Under the "All Users" section, select the user that you want to associated with Leapfin. The user status must be "Active".

📘

In case you don't want to associate Leapfin with any existing user, you can also create a new API user by following Zuora's guide here.

Step 3: In the "New OAuth Client" section, enter a name and description for the OAuth client. Then click "create".

Step 4: The newly created Client ID and Client Secret will appear on the screen. Record both information. This is the only time you can see the Client Secret.

Step 5: Log into Leapfin platform. Click the company name at the top right and navigate to Integrations > Zuora (CONNECT). Enter the Client ID and Client Secret you recorded. Click on "Confirm" to save the connection.

Data Sources

Once authenticated, Leapfin pulls data from Zuora's REST API. Specifically, the data query endpoint is used to fetch following data objects. Data are fetched on a daily basis. There is also a backfill model to pull historical data.

To better understand the relationships among Zuora data objects, a data model diagram is available.

Invoices

Zuora Invoice object provides information about customers' accounts for invoices, including dates, status, and amounts. It is created at the account level, and can include all of the charges for multiple subscriptions for an account. For more information, refer to Zuora documents here.

Leapfin imports each Zuora invoice object as a zuora-invoice record on Leapfin Platform.

sample data

{
  "InvoiceDate": "2011-01-10",
  "TaxExemptAmount": 0,
  "UpdatedDate": "2016-10-20T05:45:45.000+02:00",
  "CreditBalanceAdjustmentAmount": 0,
  "Status": "Posted",
  "TargetDate": "2016-10-20",
  "BillToContactId": "2c93808457d787030157e031bb3f43f8",
  "PaymentTerm": "Net 30",
  "AccountId": "2c93808457d787030157e031d2704c28",
  "IncludesOneTime": true,
  "InvoiceNumber": "INV00000002",
  "UpdatedById": "2c93808457d787030157e031bb3f4aa5",
  "PaymentAmount": 0,
  "Id": "2c93808457d787030157e031d86c4c57",
  "TaxAmount": 0,
  "IncludesUsage": true,
  "CreatedById": "2c93808457d787030157e031bb3f4aa5",
  "CreatedDate": "2016-10-20T05:45:45.000+02:00",
  "Body": "JVBERi0xLjUNCjQg......QNCiUlRU9GDQo=",
  "PostedDate": "2016-10-20T05:45:45.000+02:00",
  "Amount": 23.92,
  "Balance": 23.92,
  "RefundAmount": 0,
  "AmountWithoutTax": 23.92,
  "AdjustmentAmount": 0,
  "PostedBy": "2c93808457d787030157e031bb3f4aa5",
  "DueDate": "2011-01-10",
  "IncludesRecurring": true,
  "SourceType": "Subscription",
  "SequenceSetId": "2c93808457d787030157e031bb3f4ab1"
}

Invoice Items

A Zuora invoice item is an individual line item in an invoice. Invoice items are charges, such as a monthly recurring charge. The InvoiceItem object is used to manage charges in an Invoice object. For more information, refer to Zuora documents here.

Leapfin imports each Zuora invoice item object as a zuora-invoiceitem record on Leapfin Platform.

sample data

{
  "ServiceEndDate": "2016-10-20",
  "Id": "2c93808457d787030157e03089c03c3b",
  "ChargeDate": "2016-10-20T05:44:19.000+02:00",
  "AccountingCode": "Accounts Receivable",
  "UnitPrice": 10,
  "SubscriptionId": "2c93808457d787030157e03088bf3c24",
  "ProcessingType": 0,
  "Quantity": 1,
  "ChargeAmount": 10,
  "ServiceStartDate": "2016-10-20",
  "CreatedById": "2c93808457d787030157e03071873a9a",
  "CreatedDate": "2016-10-20T05:44:19.000+02:00",
  "TaxAmount": 0,
  "ChargeName": "OneTime_Flat Fee Pricing1476935059154",
  "SKU": "API-SKU1476935058740",
  "SourceItemType": "SubscriptionComponent",
  "UpdatedDate": "2016-10-20T05:44:21.000+02:00",
  "UpdatedById": "2c93808457d787030157e03071873a9a",
  "TaxExemptAmount": 0,
  "excludeItemBillingFromRevenueAccounting": true,
  "InvoiceId": "2c93808457d787030157e03089bb3c39",
  "ProductDescription": "Create product via API",
  "RatePlanChargeId": "2c93808457d787030157e03088ec3c2d"
}

Invoice Item Adjustments

A Zuora invoice item adjustment modifies a specific line item invoice. You use an invoice item adjustment to change a line item's details, such as its taxes or discounts. Adjustments are automatically tied to the accounting code and revenue recognition code that are associated with the item's charge. For more information, refer to Zuora documents here.

Leapfin imports each Zuora invoice item adjustment object as a zuora-invoiceitemadjustment record on Leapfin Platform.

sample data

{
  "AdjustmentNumber": "IIA-00000001",
  "ServiceEndDate": "2016-10-20",
  "Id": "2c93808457d787030157e0324aea5158",
  "AccountingCode": "Accounts Receivable",
  "UpdatedDate": "2016-10-20T05:46:14.000+02:00",
  "AccountId": "2c93808457d787030157e032485b5131",
  "Comment": "this is comments",
  "InvoiceNumber": "INV00000001",
  "InvoiceId": "2c93808457d787030157e03248c75142",
  "ServiceStartDate": "2016-10-20",
  "InvoiceItemName": "OneTime_Flat Fee Pricing1476935174089",
  "CreatedDate": "2016-10-20T05:46:14.000+02:00",
  "ReasonCode": "Standard Adjustment",
  "UpdatedById": "2c93808457d787030157e032283c4fb2",
  "Amount": 1.2,
  "AdjustmentDate": "2016-10-20",
  "Type": "Credit",
  "Status": "Processed",
  "SourceType": "InvoiceDetail",
  "SourceId": "2c93808457d787030157e03248c95144",
  "ReferenceId": "refid-1476935174845",
  "CreatedById": "2c93808457d787030157e032283c4fb2",
  "ExcludeItemBillingFromRevenueAccounting": "true"
}

Payments

The Zuora Payment object holds all of the information about an individual payment, including the payment amount and to which invoices the payment was applied to. For more information, refer to Zuora documents here.

Leapfin imports each Zuora payment object as a zuora-payment record on Leapfin Platform.

sample data

{
  "id": "4028905f5a87c0ff015a87eb6b75007f",
  "number": "P-00000001",
  "status": "Processed",
  "type": "External",
  "accountId": "4028905f5a87c0ff015a87d25ae90025",
  "accountNumber": "A00000001",
  "amount": 44.1,
  "appliedAmount": 44.1,
  "unappliedAmount": 0,
  "refundAmount": 0,
  "creditBalanceAmount": 0,
  "currency": "USD",
  "effectiveDate": "2017-03-01",
  "comment": "normal payment",
  "paymentMethodId": "402881e522cf4f9b0122cf5dc4020045",
  "paymentMethodSnapshotId": null,
  "authTransactionId": null,
  "bankIdentificationNumber": null,
  "gatewayId": null,
  "gatewayOrderId": null,
  "gatewayResponse": null,
  "gatewayResponseCode": null,
  "gatewayState": "NotSubmitted",
  "markedForSubmissionOn": null,
  "referenceId": null,
  "secondPaymentReferenceId": null,
  "softDescriptor": null,
  "softDescriptorPhone": null,
  "submittedOn": null,
  "settledOn": null,
  "cancelledOn": null,
  "createdDate": "2017-03-01 11:30:37",
  "createdById": "402881e522cf4f9b0122cf5d82860002",
  "updatedDate": "2017-03-01 11:30:37",
  "updatedById": "402881e522cf4f9b0122cf5d82860002",
  "financeInformation": {
    "bankAccountAccountingCode": null,
    "bankAccountAccountingCodeType": null,
    "unappliedPaymentAccountingCode": null,
    "unappliedPaymentAccountingCodeType": null,
    "transferredToAccounting": "No"
  },
  "gatewayReconciliationStatus": null,
  "gatewayReconciliationReason": null,
  "payoutId": null,
  "success": true
}

Invoice Payments

A Zuora invoice payment is a mechanism that ties a payment to an invoice and indicates how much of the payment was applied to the invoice. If you have the Invoice Settlement feature enabled (available since March 2021), this object is deprecated and only available for backward compatibility. For more information, refer to Zuora documents here.

Leapfin imports each Zuora invoice payment object as a zuora-invoicepayment record on Leapfin Platform.

sample data

{
  "Id": "2c93808457d787030157e02dee6e1b7a",
  "PaymentId": "2c93808457d787030157e02de5fc1b57",
  "CreatedDate": "2016-10-20T05:41:29.000+02:00",
  "UpdatedDate": "2016-10-20T05:41:29.000+02:00",
  "Amount": 10,
  "CreatedById": "2c93808457d787030157e02dc3d919dc",
  "UpdatedById": "2c93808457d787030157e02dc3d919dc",
  "RefundAmount": 0,
  "InvoiceId": "2c93808457d787030157e02deadb1b6d"
}

Refunds

A Zuora refund returns money to a customer - as opposed to a credit, which creates a customer credit balance that may be applied to reduce the amount owed to you. For instance, refunds are used when a customer cancels service and is no longer your customer. Refunds can also represent processed payments that are reversed, such as a chargeback or a direct debit payment reversal. For more information, refer to Zuora documents here.

Leapfin imports each Zuora refund object as a zuora-refund record on Leapfin Platform.

sample data

{
  "id": "4028905f5a87c0ff015a889e590e00c9",
  "number": "R-00000001",
  "status": "Processed",
  "type": "External",
  "methodType": "CreditCard",
  "accountId": "4028905f5a87c0ff015a87d25ae90025",
  "amount": 4,
  "refundDate": "2017-03-01",
  "comment": "Create a refund for unapplied payment.",
  "paymentMethodId": null,
  "paymentMethodSnapshotId": null,
  "paymentId": "4028905f5a87c0ff015a889ddfb800c0",
  "creditMemoId": null,
  "reasonCode": "Standard Refund",
  "gatewayId": null,
  "gatewayResponse": null,
  "gatewayResponseCode": null,
  "gatewayState": "NotSubmitted",
  "markedForSubmissionOn": null,
  "referenceId": null,
  "secondRefundReferenceId": null,
  "softDescriptor": null,
  "softDescriptorPhone": null,
  "submittedOn": null,
  "settledOn": null,
  "cancelledOn": null,
  "createdDate": "2017-03-01 14:46:03",
  "createdById": "402881e522cf4f9b0122cf5d82860002",
  "updatedDate": "2017-03-01 14:46:03",
  "updatedById": "402881e522cf4f9b0122cf5d82860002",
  "refundTransactionTime": null,
  "financeInformation": {
    "bankAccountAccountingCode": null,
    "bankAccountAccountingCodeType": null,
    "unappliedPaymentAccountingCode": null,
    "unappliedPaymentAccountingCodeType": null,
    "transferredToAccounting": "No"
  },
  "gatewayReconciliationStatus": null,
  "gatewayReconciliationReason": null,
  "payoutId": null,
  "success": true
}

Refund Invoice Payments

A Zuora refund invoice payment represents a portion of the refund that's being made against a payment that was applied to an invoice. If you have the Advanced AR Settlement feature enabled, this object is deprecated and only available for backward compatibility. For more information, refer to Zuora documents here.

Leapfin imports each Zuora refund invoice payment object as a zuora-refundinvoicepayment record on Leapfin Platform.

sample data

{
  "CreatedById": "string",
  "CreatedDate": "2022-10-24T18:09:27Z",
  "Id": "string",
  "InvoiceId": "string",
  "InvoicePaymentId": "string",
  "RefundAmount": 0,
  "RefundId": "string",
  "UpdatedById": "string",
  "UpdatedDate": "2022-10-24T18:09:27Z"
}

Accounts

A Zuora account is a customer account that collects all of the critical information about the customer, such as contact information, payment terms, and payment methods. For more information, refer to Zuora documents here.

Leapfin imports each Zuora invoice payment object as a zuora-invoicepayment record on Leapfin Platform.

sample data

{
  "basicInfo": {
    "id": "402892c74c9193cd014c91d35b0a0132",
    "name": "Test",
    "accountNumber": "A00000001",
    "notes": "",
    "status": "Active",
    "crmId": "",
    "batch": "Batch1",
    "invoiceTemplateId": null,
    "communicationProfileId": "303d186840e611df817c002185d714e1",
    "salesRep": "",
    "sequenceSetId": null
  },
  "billingAndPayment": {
    "billCycleDay": 1,
    "currency": "USD",
    "defaultPaymentMethodId": "2c93808457d787030157e03220ec4fad",
    "paymentTerm": "Net 30",
    "paymentGateway": "TestGateway",
    "invoiceDeliveryPrefsPrint": false,
    "invoiceDeliveryPrefsEmail": true,
    "additionalEmailAddresses": [
      "[email protected]",
      "[email protected]"
    ]
  },
  "metrics": {
    "balance": 0,
    "totalInvoiceBalance": 0,
    "creditBalance": 0,
    "contractedMrr": -900
  },
  "billToContact": {
    "address1": "",
    "address2": "",
    "city": "",
    "country": null,
    "county": null,
    "fax": "",
    "firstName": "Test",
    "homePhone": "",
    "id": "2c9081a03c6d7b51013c6d7e46c80a17",
    "lastName": "Test",
    "mobilePhone": "",
    "nickname": "",
    "otherPhone": "",
    "otherPhoneType": null,
    "personalEmail": "",
    "state": "",
    "taxRegion": null,
    "workEmail": "[email protected]",
    "workPhone": "",
    "zipCode": ""
  },
  "soldToContact": {
    "address1": "",
    "address2": "",
    "city": "",
    "country": null,
    "county": null,
    "fax": "",
    "firstName": "Test",
    "homePhone": "",
    "id": "2c9081a03c6d7b51013c6d7e46cf0a18",
    "lastName": "Test",
    "mobilePhone": "",
    "nickname": "",
    "otherPhone": "",
    "otherPhoneType": null,
    "personalEmail": "",
    "state": "",
    "taxRegion": null,
    "workEmail": "[email protected]",
    "workPhone": "",
    "zipCode": ""
  },
  "success": true
}

Mapping Logics

zuora-invoice

Leapfin imports each Zuora invoice object as a zuora-invoice record on Leapfin Platform. Besides invoice information, credit issuance and application is also included in the record.

Create an Invoice

An Invoice record is created for each zuora-invoice record.

Target: LeapfinInvoice (schema)Source: zuora-invoice (schema) and zuora-account (schema)
objectType"invoice"
idzuora-invoice.id
totalzuora-invoice.amount
subtotalzuora-invoice.amountWithoutTax
currencyCodefetch the zuora-account record by zuora-invoice.accountId, then set currencyCode as zuora-account.currency
statusif zuora-invoice.status is "Draft", then set status as "drafted".
else if zuora-invoice.status\ is "Posted", then set status as "open".
otherwise, set status as "voided"
datezuora-invoice.createdDate
issueDatezuora-invoice.invoiceDate
uncollectibleDatenone
paidDatenone
dueDatezuora-invoice.dueDate
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- invoiceNumber = zuora-invoice.invoiceNumber
-- adjustmentAmount = zuora-invoice.adjustmentAmount
-- paymentAmount = zuora-invoice.paymentAmount
-- refundAmount = zuora-invoice.refundAmount
-- all custom fields (i.e. field with name "XXX__c" on zuora-invoice are also included
linksnone

Create a Credit

A Credit record is created for each zuora-invoice record with non-zero creditBalanceAdjustmentAmount.

Target: LeapfinCredit (schema)Source: zuora-invoice (schema) and zuora-account (schema)
objectType"credit"
idzuora-invoice.id
amountabsolute value of zuora-invoice.creditBalanceAdjustmentAmount
currencyCodefetch the zuora-account record by zuora-invoice.accountId, then set currencyCode as zuora-account.currency
datezuora-invoice.createdDate
typeif zuora-invoice.creditBalanceAdjustmentAmount > 0, then set type as "issuance"
otherwise, set type as "application"
description""
startDatezuora-invoice.invoiceDate
endDatezuora-invoice.invoiceDate
exchangeRatesnone
customFieldsnone
linksAdd a link to the Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoice.id

zuora-invoiceitem

Leapfin imports each Zuora invoice item object as a zuora-invoiceitem record on Leapfin Platform. Depend on the processingType, a zuora-invoiceitem record can represent either a purchased item, a discount, or a tax.

Create a Line Item

A Line Item record is created for each zuora-invoiceitem record with processingType = "0" or "2".

Target: LeapfinLineItem (schema)Source: zuora-invoiceitem (schema) and zuora-account (schema)
objectType"line-item"
idzuora-invoiceitem.id
amountzuora-invoiceitem.chargeAmount
currencyCodefetch the zuora-account record by zuora-invoiceitem.accountId, then set currencyCode as zuora-account.currency
datezuora-invoiceitem.createdDate
quantityzuora-invoiceitem.quantity
discountAmount0
descriptionzuora-invoiceitem.chargeName
startDatezuora-invoiceitem.serviceStartDate
endDatezuora-invoiceitem.serviceEndDate
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- sku = zuora-invoiceitem.sku
-- unitPrice = zuora-invoiceitem.unitPrice
-- accountingcode = zuora-invoiceitem.accountingcode
-- all custom fields (i.e. field with name "XXX__c" on zuora-invoiceitem are also included
linksAdd a link to the Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoiceitem.invoiceId

Create a Discount

A Discount record is created for each zuora-invoiceitem record with processingType = "1".

Target: LeapfinDiscount (schema)Source: zuora-invoiceitem (schema) and zuora-account (schema)
objectType"line-item"
idzuora-invoiceitem.id
amountzuora-invoiceitem.chargeAmount
currencyCodefetch the zuora-account record by zuora-invoiceitem.accountId, then set currencyCode as zuora-account.currency
datezuora-invoiceitem.createdDate
descriptionzuora-invoiceitem.chargeName
startDatezuora-invoiceitem.serviceStartDate
endDatezuora-invoiceitem.serviceEndDate
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- sku = zuora-invoiceitem.sku
-- unitPrice = zuora-invoiceitem.unitPrice
-- accountingcode = zuora-invoiceitem.accountingcode
-- all custom fields (i.e. field with name "XXX__c" on zuora-invoiceitem are also included
linksAdd a link to the Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoiceitem.invoiceId

Create a Tax (line item level)

A Tax record is created for each zuora-invoiceitem record with processingType = "0", "1" or "2" and with non-zero taxAmount.

Target: LeapfinTax (schema)Source: zuora-invoiceitem (schema) and zuora-account (schema)
objectType"tax"
idzuora-invoiceitem.id
amountzuora-invoiceitem.taxAmount
currencyCodefetch the zuora-account record by zuora-invoiceitem.accountId, then set currencyCode as zuora-account.currency
datezuora-invoiceitem.createdDate
description""
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- taxCode = zuora-invoiceitem.taxCode
-- taxMode = zuora-invoiceitem.taxMode
-- taxExemptAmount = zuora-invoiceitem.taxExemptAmount
linksif zuora-invoiceitem.processingType = "0" or "2", then add a link to the associated Line Item record with:
-- objectType = "line-item"
-- id = zuora-invoiceitem.invoiceId
if zuora-invoiceitem.processingType = "1", then add a link to the associated Discount record with:
-- objectType = "discount"
-- id = zuora-invoiceitem.invoiceId

Create a Tax (invoice level)

A Tax record is created for each zuora-invoiceitem record with processingType = "3".

Target: LeapfinTax (schema)Source: zuora-invoiceitem (schema) and zuora-account (schema)
objectType"tax"
idzuora-invoiceitem.id
amountzuora-invoiceitem.chargeAmount
currencyCodefetch the zuora-account record by zuora-invoiceitem.accountId, then set currencyCode as zuora-account.currency
datezuora-invoiceitem.createdDate
description""
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- taxCode = zuora-invoiceitem.taxCode
-- taxMode = zuora-invoiceitem.taxMode
-- taxExemptAmount = zuora-invoiceitem.taxExemptAmount
-- all custom fields (i.e. field with name "XXX__c" on zuora-invoiceitem are also included
linksAdd a link to the associated Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoiceitem.invoiceId

zuora-invoiceitemadjustment

Leapfin imports each Zuora invoice item adjustment object as a zuora-invoiceitemadjustment record on Leapfin Platform. Depend on the type value, the record can represent either a purchased item or an applied credit .

Create a Line Item

A Line Item record is created for each zuora-invoiceitemadjustment record with type = "Charge".

Target: LeapfinLineItem (schema)Source: zuora-invoiceitemadjustment (schema) and zuora-account (schema)
objectType"line-item"
idzuora-invoiceitemadjustment.id
amountzuora-invoiceitemadjustment.amount
currencyCodefetch the zuora-account record by zuora-invoiceitemadjustment.accountId, then set currencyCode as zuora-account.currency
datezuora-invoiceitemadjustment.adjustmentDate
quantityzuora-invoiceitemadjustment.quantity
discountAmount0
descriptionzuora-invoiceitemadjustment.reasonCode
startDatezuora-invoiceitemadjustment.serviceStartDate
endDatezuora-invoiceitemadjustment.serviceEndDate
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- adjustmentNumber = zuora-invoiceitemadjustment.adjustmentNumber
-- accountingcode = zuora-invoiceitemadjustment.accountingcode
-- type = zuora-invoiceitemadjustment.type
-- invoiceItemName = zuora-invoiceitemadjustment.invoiceItemName
-- paymentGateway = zuora-account.paymentGateway
-- taxCompanyCode = zuora-account.taxCompanyCode
linksAdd a link to the Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoiceitemadjustment.invoiceId

Create a Credit

A Credit record is created for each zuora-invoiceitemadjustment record with type = "Credit".

Target: LeapfinCredit (schema)Source: zuora-invoiceitemadjustment (schema) and zuora-account (schema)
objectType"credit"
idzuora-invoice.id
amountnegative value of zuora-invoiceitemadjustment.amount
currencyCodefetch the zuora-account record by zuora-invoiceitemadjustment.accountId, then set currencyCode as zuora-account.currency
datezuora-invoiceitemadjustment.adjustmentDate
type"application"
descriptionzuora-invoiceitemadjustment.reasonCode
startDatezuora-invoiceitemadjustment.serviceStartDate
endDatezuora-invoiceitemadjustment.serviceEndDate
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- adjustmentNumber = zuora-invoiceitemadjustment.adjustmentNumber
-- accountingcode = zuora-invoiceitemadjustment.accountingcode
-- type = zuora-invoiceitemadjustment.type
-- invoiceItemName = zuora-invoiceitemadjustment.invoiceItemName
-- paymentGateway = zuora-account.paymentGateway
-- taxCompanyCode = zuora-account.taxCompanyCode
linksAdd a link to the Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoiceitemadjustment.id

zuora-payment

Leapfin imports each Zuora payment object as a zuora-payment record on Leapfin Platform.

Create a Payment

A Payment record is created for each zuora-payment record.

Target: LeapfinPayment (schema)Source: zuora-payment (schema) and zuora-invoicepayment (schema)
objectType"payment"
idzuora-payment.id
amountzuora-payment.amount
currencyCodezuora-payment.currency
datezuora-payment.createdDate
statusif zuora-payment.status is "Posted" or "Processed", then set status as "succeeded",
else if zuora-payment.status is "Error" or "Canceled", then set status as "failed",
otherwise, set status as "pending".
succeededDateif zuora-payment.status is "Error" or "Canceled", then set status as "failed", set succeededDate as zuora-payment.effectiveDate.
descriptionzuora-payment.gatewayResponse
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- gatewayState = zuora-payment.gatewayState
-- paymentNumber = zuora-payment.paymentNumber
-- sourceName = zuora-payment.sourceName
-- all custom fields (i.e. field with name "XXX__c" on zuora-payment are also included
linksfetch zuora-invoicepayment record with paymentId = zuora-payment.id, then add a link to the associated Invoice record with:
-- objectType = "invoice"
-- id = zuora-invoicepayment.invoiceId

zuora-refund

Leapfin imports each Zuora refund object as a zuora-refund record on Leapfin Platform.

Create a Refund

A Refund record is created for each zuora-refund record.

Target: LeapfinRefund (schema)Source: zuora-refund (schema) , zuora-refundinvoicepayment (schema), zuora-invoicepayment (schema )and zuora-account (schema)
objectType"refund"
idzuora-refund.id
amountzuora-refund.amount
currencyCodefetch the zuora-account record by zuora-refund.accountId, then set currencyCode as zuora-account.currency
datezuora-refund.createdDate
statusif zuora-refund.status is "Processed", then set status as "succeeded",
else if zuora-refund.status is "Error" or "Canceled", then set status as "failed",
otherwise, set status as "pending".
exchangeRatesnone
customFieldsThe following fields from source record are added:
-- paymentNumber = zuora-payment.paymentNumber
-- refundNumber = zuora-payment.refundNumber
-- all custom fields (i.e. field with name "XXX__c" on zuora-refund are also included
linksfetch zuora-refundinvoicepayment record with refundId = zuora-refund.id
then fetch zuora-invoicepayment record with id = zuora-refundinvoicepayment.invoicePaymentId
add a link to the associated Payment record with:
-- objectType = "payment"
-- id = zuora-invoicepayment.paymentId