Happy Business Starts Here

Highlighted

How do I add a custom field of type multi select picklist?

I need to add a custom field, say Vehicle Make, to the products fields. In the front end, the field is of type muti select picklist. 

 

By creating a custom field of type Picklist, I am able to select only one option. How do achieve this?

 

How do I send this field to the API?

8 REPLIES 8
Zuora Support Moderator

Re: How do I add a custom field of type multi select picklist?

Hi @irachamreddy, could you clarify what are you looking for exactly? As long as you're entering any values separated by a new line, they will be available for picking via the UI and API as well. If you only need one value, then you can enter only one value, set it as the default pick, and make the field required.

 

Multiple item picklist:

 

pick.jpg

 

Single item picklist:

 

pick2.jpg

 

This can be queried via API:

 

 

<ns1:query>
      <ns1:queryString>
Select id, pick__c
from product
where pick__c = 'pick1'
      </ns1:queryString>
</ns1:query>

Or alternatively via REST:

 

 

GET https://rest.apisandbox.zuora.com/v1/object/product/PRODUCTID


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

Re: How do I add a custom field of type multi select picklist?

@Viktor Thank you for the reply.

Basically, I should be able to select mutiple values to the single field. Say, I have a custom fieldd of type Make as below. Here, I can have 1/more values assigned to 'Make'. Make = {'BMW', 'Volkswagen', 'Ford'} or BMW

 

 

Capture.PNG

 

I have aded this field to the product. While creating the product via API, how do I pass this in the input?

 

 

Regards,

Indira.R

Zuora Support Moderator

Re: How do I add a custom field of type multi select picklist?

Got it @irachamreddy !

 

Could you show me the call template you're currently using for creating the products? (Make sure not to include any session IDs or login information when posting call templates!)



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

Re: How do I add a custom field of type multi select picklist?

@Viktor Below is the input that I am passing to create product via API. Now, I need to pass Make as well which can have one/multiple values. I am not sure on how to pass it.

 

{
"Description":"PPM",
"EffectiveEndDate":"2066-03-27",
"EffectiveStartDate":"2017-03-27",
"Name":"PPM",
"Category": "Base Products",
"AllowFeatureChanges": true,
"DealerId__c": "1111"
}

Zuora Support Moderator

Re: How do I add a custom field of type multi select picklist?

@irachamreddy please try the following and let me know if it works:

 

{
"Description":"PPM",
"EffectiveEndDate":"2066-03-27",
"EffectiveStartDate":"2017-03-27",
"Name":"PPM",
"Category": "Base Products",
"AllowFeatureChanges": true,
"DealerId__c": "1111",
"Make__c": "Ford"
}

Please note that one Product can be associated with only one Picklist item, you can't limit the number of available fields in the custom field based on specific requirements. All custom field picklist items are available for all Products, but they will have a one-to-one relation.

 

What is the business case we're looking at here? Could you provide some more explanation on how this Product custom field should align with your processes?

 

Thanks!



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

Re: How do I add a custom field of type multi select picklist?

@Viktor Passing one value may not help us.

 

Dealer can create various prepaid maintenance plans in their porta which are in turn converted to products in Zuora.

He may say that, a particular plan is applicable to only certain vehicle makes and models. In that scenario, we should be able to accept mutiple values to the Make and Model year fields.

Zuora Staff

Re: How do I add a custom field of type multi select picklist?

You may have a means to select multiple values in the portal, like BMW, Mercedes, Lexus... and convert this choice into a CVS list "BMW,Mercedes,Lexus" whose value is stored as a single text in Zuora. 

 

This is how we do.

 

Zuora does not support multi valued picklists as custom fields.

Re: How do I add a custom field of type multi select picklist?

@Emmanuel Thank you! How do I query for it when I consider it as a single text?

 

Meaning, Product-1: Make = "BMW,Lexus.Volkswagen,Ford,KIA"

Product-2="BMW,Ford,Hyundai,Honda"

 

I may want to find all the products that are applicable to BMW and Ford. In general, using SQL we can write a query like "select * from products where Make like '%BMW%Ford%' ".

 

Q1. what is the best way to achieve this type of scenario's in Zuora? I think only leading or trailing % is allowed in Zuora.

Q2. Using the API https://rest.apisandbox.zuora.com/v1/action/query we can retrieve the entire product catalog. Say, I want to retrieve the entire product catalog whose Make is 'BMW' or 'Ford' etc. How do I achieve this? Individually getting a product, product rate plan, rate plan charges and associated features is being a big headache.

 

 

Thank You!