Guides and Examples
...
Products
Publishing Products
7 min
nue's approach to self service products creates an additional layer on top of your existing product catalog source of truth your main product catalog in nue remains the single source of truth selective publishing only explicitly published products are available in self service stability published products remain consistent until republished, even if the source product changes this publishing mechanism provides several benefits for self service implementations protects self service customers from unexpected product changes allows testing of product changes before making them available to self service provides a clean separation between direct sales and self service offerings publishing workflow for self service to make products available through the self service api, follow this two step process enable a price book navigate to price builder → price books select the price book and click 'edit' click 'enable for self service' once complete, two webhook endpoints will be created that allow you to track the success of actions syncing to salesforce from nue publish individual products navigate to price builder → product catalog select the product to publish and click 'edit' click 'publish' to make it available for self service only products that have both an enabled price book and have been explicitly published will appear in api responses please refrain from editing or removing the automatically generated webhook endpoints listed below order activated subscription updated deleting or editing these will lead sync failure from nue to salesforce checking publication status via api once you understand the publishing workflow, you'll want to programmatically verify publication status and filter products based on their availability verify product publication status try it now fetch products api → https //api docs nue io/fetch product const myheaders = new headers(); myheaders append("nue api key", "your api key here"); myheaders append("content type", "application/json"); async function checkpublicationstatus() { const response = await fetch("https //api nue io/catalog/products", { method 'get', headers myheaders }); const products = await response json(); // analyze publication status const publicationreport = { published \[], unpublished \[], totalproducts products length }; products foreach(product => { const statusinfo = { id product id, name product name, status product status, publishstatus product publishstatus, lastpublisheddate product lastpublisheddate, hasactivepricing product pricebookentries? some(entry => entry active) || false }; if (product publishstatus === 'published' && product status === 'active') { publicationreport published push(statusinfo); } else { publicationreport unpublished push(statusinfo); } }); return publicationreport; } // usage checkpublicationstatus() then(report => { console log('📊 publication status report'); console log(`total products ${report totalproducts}`); console log(`published ${report published length}`); console log(`unpublished ${report unpublished length}`); console log('\n✅ published products '); report published foreach(product => { console log(` • ${product name} (${product id})`); console log(` last published ${product lastpublisheddate}`); console log(` active pricing ${product hasactivepricing ? 'yes' 'no'}`); }); if (report unpublished length > 0) { console log('\n❌ unpublished products '); report unpublished foreach(product => { console log(` • ${product name} (${product id})`); console log(` status ${product status}, publish status ${product publishstatus}`); }); } }); best practices for publication management regular monitoring check publication status regularly to ensure product availability staged publishing test products internally before publishing to self service publication history track when products were last published for maintenance scheduling graceful degradation handle cases where no products are available status transparency provide clear feedback about product availability to customers the publishing layer gives you complete control over what products are available in self service while maintaining the flexibility to make changes without disrupting customer experiences