Guides and Examples
Nue Platform
Manage Custom Fields
11 min
overview nue offers a dual platform, which means nue’s platform stores and manages data from 2 different saas platforms salesforce & nue’s cloud services if your nue instance is connected to a salesforce org, all the objects that support products and pricing have salesforce as the only data source you can use nue’s graphql service to access the data of any objects in nue if the object has salesforce as the data source, the data will be queried from salesforce otherwise, the data will be retrieved from nue services you can login to nue and navigate to settings > business objects, and see a list of objects in nue for any object in the list, if salesforce api name is not empty, the object has salesforce as the data source create custom fields so to create custom fields in nue that has salesforce as the data source, you will need to create custom fields in salesforce, and then synchronize the custom fields to nue create custom field in salesforce to create a custom field in salesforce, you can login to the connected salesforce org and click setup > object manager, and select the object for example, ‘product’ then click fields and relationships, and click ‘new’ to create a new custom field please note that nue requires a custom field to have at least 5 characters in length we’ll soon remove this limitation in the upcoming release add custom field to field set now click ‘field set’ and click to open the field set ‘fields exposed to nue’ add the newly created custom fields to this field set please note that only fields added to this field set can be synchronized to nue repeat the above 2 steps to complete creating your custom fields please note that we currently support the custom fields sync to nue for the following objects account entity product price book & price book entry feature (a k a product group) subscription asset entitlement unit of measure (uom) order & order product invoice, invoice item & invoice item detail credit memo, credit memo item & credit memo item detail synchronize custom fields to nue to synchronize custom fields from salesforce to nue, please follow the steps below login to nue app, and navigate to system settings search for "business objects" click on button "sync custom fields from salesforce" once the custom fields have been successfully synchronized from salesforce to nue, you should be able to view the custom fields available for the listed object query objects with newly created custom fields you can now use graphql to access the newly created and sync’ed custom fields, as if you’re querying standard fields in the following example that queries all active bundle products, productcost c is a custom field on product object query { product(where { and \[{configurable { eq true}}, {status { eq "active"}}]}) { autorenew configurable defaultrenewalterm defaultsubscriptionterm defaultuomid description enddate id name pricemodel productcategory sku startdate status productcost c } } customize the bundle or product layout in nue you can create a bundle or product custom field layout using the create layout api post {{endpoint}}/metadata/layouts to create a custom field layout section for product, use name product customfields to create a custom field layout section for bundle, use name bundle customfields in the following curl example, a custom field layout is created for the bundle product containing one custom field productcost c curl location 'https //api nue io/metadata/layouts' \\ \ header 'nue api key {{nue api key}}' \\ \ header 'content type application/json' \\ \ data '{ "type" "formview", "apiname" "bundle customfields", "name" "bundle customfields", "objectapiname" "product", "content" "{\\"layout\\" \[{\\"apiname\\" \\"productcost c\\",\\"xs\\" \\"6\\"}]}", "tags" \["product", "customfields"] } you can further customize the rendering of each custom field in the section using the following field properties { "apiname" "api name of the custom field", "name" "the display name of the field", "type" "boolean", //also support other display types "creatable" true, //indicates if this field is read only in the create layout "updatable" true, //indicate if this field is read only in the update layout "inlinehelptext" "the help text", "required" false } verify the custom field section after successfully created the bundle or product custom field layout, you can create or edit a new product or bundle and verify the custom field section is appended to the end of the layout, as shown in the following example