Publishing Products
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 ā
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.