Publishing Price Tags
Nue's approach to self-service price tags creates an additional layer on top of your existing pricing rules:
- Source of Truth: Your main price tag catalog in Nue remains the single source of truth
- Selective Publishing: Only explicitly published price tags are available in self-service
- Stability: Published price tags remain consistent until republished, even if the source price tag changes
This publishing mechanism provides several benefits for self-service implementations:
- Protects self-service customers from unexpected pricing changes
- Allows testing of pricing rules before making them available to self-service
- Provides a clean separation between direct sales and self-service pricing
- Ensures pricing consistency for ongoing transactions
Publishing Workflow for Self-Service
To make price tags available through the Self-Service API, follow this process:
Create and Publish Price Tags:
- Navigate to Price Builder ā Price Tags
- Create or edit your price tag with appropriate tiers and rules
- Set the price tag status to 'Active'
- Click the Edit icon on your price tag
- Make any desired edits
- Click 'Publish' to make it available for self-service
- Confirm by clicking 'Yes'
Only price tags that are both active and explicitly published will appear in Self-Service API responses.
Checking Publication Status via API
Once you understand the publishing workflow, you'll want to programmatically verify publication status and filter price tags based on their availability.
Verify Price Tag Publication Status
Try it now: Fetch price tags API ā
const myHeaders = new Headers();
myHeaders.append("nue-api-key", "YOUR_API_KEY_HERE");
myHeaders.append("Content-Type", "application/json");
async function checkPriceTagPublicationStatus() {
const response = await fetch("https://api.nue.io/catalog/price-tags", {
method: 'GET',
headers: myHeaders
});
const priceTags = await response.json();
// Analyze publication status
const publicationReport = {
published: [],
totalPriceTags: priceTags.length,
byType: {
quantity: { active: 0, total: 0 },
term: { active: 0, total: 0 }
},
timeLimited: [],
permanent: []
};
priceTags.forEach(priceTag => {
const statusInfo = {
id: priceTag.id,
name: priceTag.name,
code: priceTag.code,
type: priceTag.priceTagType,
priceType: priceTag.priceType,
active: priceTag.active,
publishStatus: priceTag.publishStatus,
startTime: priceTag.startTime,
endTime: priceTag.endTime,
tierCount: priceTag.priceTiers?.length || 0
};
// All returned price tags are published
publicationReport.published.push(statusInfo);
// Categorize by type
if (priceTag.priceTagType === 'Quantity') {
publicationReport.byType.quantity.total++;
if (priceTag.active) publicationReport.byType.quantity.active++;
} else if (priceTag.priceTagType === 'Term') {
publicationReport.byType.term.total++;
if (priceTag.active) publicationReport.byType.term.active++;
}
// Categorize by time limitations
if (priceTag.endTime) {
publicationReport.timeLimited.push(statusInfo);
} else {
publicationReport.permanent.push(statusInfo);
}
});
return publicationReport;
}
// Usage
checkPriceTagPublicationStatus().then(report => {
console.log('š Price Tag Publication Status Report');
console.log(`Total Published Price Tags: ${report.totalPriceTags}`);
console.log('\nš By Type:');
console.log(` Quantity-based: ${report.byType.quantity.active}/${report.byType.quantity.total} active`);
console.log(` Term-based: ${report.byType.term.active}/${report.byType.term.total} active`);
console.log(`\nā° Time-limited: ${report.timeLimited.length} price tags`);
console.log(`š Permanent: ${report.permanent.length} price tags`);
console.log('\nā
Published Price Tags:');
report.published.forEach(priceTag => {
const status = priceTag.active ? 'š¢ Active' : 'š“ Inactive';
const timeInfo = priceTag.endTime ? `(expires ${priceTag.endTime})` : '(permanent)';
console.log(` ⢠${priceTag.name} (${priceTag.code}) ${status} ${timeInfo}`);
console.log(` Type: ${priceTag.type} - ${priceTag.priceType}, Tiers: ${priceTag.tierCount}`);
});
});Understanding Price Tag Publication States
Publication Status Fields
When working with price tags, you'll encounter these key status fields:
Field | Values | Description |
|---|---|---|
active | true, false | Whether the price tag is currently active and can be applied |
publishStatus | "Published" | Publication status (only "Published" tags appear in API) |
startTime | DateTime or null | When the price tag becomes effective |
endTime | DateTime or null | When the price tag expires (null = permanent) |
Price Tag Lifecycle States
- Draft: Price tag exists but not published (not visible in Self-Service API)
- Published & Future: Published but startTime is in the future
- Published & Active: Published and currently effective
- Published & Expired: Published but endTime has passed
- Unpublished: Was published but removed from self-service
Integration with Order Processing
Published price tags automatically become available for use in order processing if they are set at the price book entry or product option level.
Price tags can also be defined based on the draft order creation payload, like shown below.
// Price tags are automatically considered during order pricing
const orderData = {
"customer": { "id": "customer-uuid" },
"orderProducts": [{
"priceBookEntryId": "01uEa00000F9JpQIAV",
"quantity": 50,
"priceTagId": ["01uEa00000F9VpTIAL", "01uEa00000F9VpTAAL"],
"priceTagCodes": ["10PERCENTOFF", "FALLDISCOUNT"]
}]
};Next Steps
Now that you understand price tag publication:
- Monitor Publication Status: Regularly check which price tags are published
- Plan Promotional Campaigns: Use time-limited price tags for marketing
- Optimize Pricing Strategy: Analyze which price tags drive the most value
- Automate Management: Build monitoring for expiring or problematic price tags
The publishing layer gives you complete control over what pricing rules are available in self-service while maintaining the flexibility to make changes without disrupting customer experiences.