Happy Business Starts Here

Zuora Support

Need Custom field of Product Rate Plan Charge object in Invoice template

Problem:

Is it possible to add a custom field from the Product Rate Plan Charge level onto the Invoice template?

 




If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

6 REPLIES 6
Zuora Support

Re: Need Custom field of Product Rate Plan Charge object in Invoice template

Root Cause:

As per current Zuora design, We do not expose custom fields from the Product Rate Plan Charge object in the invoice template. Moreover, Invoices generated picks the value from Subscription rate plan charge object and not the product rate plan charge.

 

Please refer to the knowledge center article Display Custom Fields on the Invoice to confirm the Custom Fields that we could display on invoice templates.

 

Solution:

As a workaround, we can create custom fields in Subscription rate plan charge object and add values to that field while creating/editing a subscription. We need to use a "GroupBy" filter in invoice template so that the custom field can be displayed on Invoice.

 

Steps:

  1. Create a custom field in Subscription rate plan charge object and enter the value for that field under product & charges while creating/editing the subscription.
  2. Use the same field API name in invoice template.
  • {MERGEFIELD "TableFilter:GroupBy CustomFieldAPIName__c " * MERGEFORMAT}
  • {MERGEFIELD InvoiceItem. CustomFieldAPIName__c * MERGEFORMAT }

PRPC Custom Field.jpg

The TableFilter feature is necessary along with Groupby feature to populate custom fields from Rate Plan Charge objects on the invoice template.

 

Please refer to the knowledge center article Summarize Invoice Items to check how to use GroupBy filter feature.




If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

New Student

Re: Need Custom field of Product Rate Plan Charge object in Invoice template

Hi Rajkumar,

 

Could you explain in a little more detail what steps are required to have Subscription Rate Plan Charge Custom fields displayed on the invoice template? Do I first need to add a custom field to the Invoice Item (Invoice Detail) object, or does the field only need to exist in the Subscription Rate Plan Charge Object?

Zuora Support

Re: Need Custom field of Product Rate Plan Charge object in Invoice template

Hi Kyle,

 

You can create a custom field in the "Subscription Rate Plan Charge" object. The same can be inherited from InvoiceItem and used as the below condition. "InvoiceItem.RatePlanCharge.CustomField"

 

Please refer to the knowledge center article Merge Fields for Invoices for more details and let us know if you had any further queries.




If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

New Student

Re: Need Custom field of Product Rate Plan Charge object in Invoice template

Hi Rajkumar,

 

I have tried to use this, and have been unsuccessful. I can successfully save an invoice template with a custom field from the Rate Plan Charge, however, the value does not appear on my invoice template, as though the value has not been populated. So to reiterate, what I am seeing is the below scenario.

  1. Rate Plan Charge Object has Custom Field named CustomField__C
  2. I update the invoice template to include value InvoiceItem.CustomField__C
  3. Template successfully uploads
  4. Template does not display value of Rate Plan Charge: CustomField__c even though those values exist on the Rate Plan Charge

Let me know if I have misunderstood how to leverage this functionality. 

Zuora Staff

Re: Need Custom field of Product Rate Plan Charge object in Invoice template

Hi Kyle, 

You have to make sure that the custom fields are populated for Product Rate Plan Charges and Subscription Rate Plan Charges 

 

I did the following:

Created a Product Rate Plan Charge custom field called SKU_pfx__c

PRCP.png

Created a Subscription Rate Plan Charge custom field called SKU_sfx__c

SRPC.png

Set the value of the Product Rate Plan Charge custom field in the product catalog

PRPC_set.png

 

Set the Subscription Rate Plan Charge custom field by clicking on the Charge in the Subscription and then editing the custom fields

SRPC_set.gif

 

Add the custom field mergefields to an invoice template

INV_tmpl.png

The Rendered template for this particular subscription on the account is shown below:

INV_render.png

 

I hope this helps with your understanding

 

Cheers,

Kevin

 

New Student

Re: Need Custom field of Product Rate Plan Charge object in Invoice template

Thanks, Kevin. I am encouraged to see the behavior work like you've shown, as that was what I was hoping could be accomplished. Unfortunately, I have been unable to get that functionality to work; I am getting the error below:Error Message.PNG

 

 

 

 

 

 

If I change the merge field to "InvoiceItem.OpportunityID__c', the template will save, although no information will be displayed for the field on the template.

 

I have a call with support tomorrow morning to review, and hopefully we will be able to determine where I've gone astray. 

 

Thanks again for providing the screenshots as they're very helpful.