Spaces:
Sleeping
Sleeping
Download modules/amazon.js from publicstring/sellersnode: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/spaces/publicstring/sellersnode/resolve/380604ef841a74632efdf03e1d3ddd612b03498a/modules/amazon.js
- Command line
-
hf download hf://spaces/publicstring/sellersnode@380604ef841a74632efdf03e1d3ddd612b03498a/modules/amazon.js
-
curl -L -o amazon.js https://huggingface.co/spaces/publicstring/sellersnode/resolve/380604ef841a74632efdf03e1d3ddd612b03498a/modules/amazon.js
1.72 kB
| /** | |
| * AMAZON ELECTRONICS VENDOR | |
| * Demonstrates routing based on specific items (iPhone vs Mac). | |
| */ | |
| module.exports = { | |
| agent_id: 'amazon.anp', | |
| display_name: 'Amazon Electronics', | |
| categories: ['electronics', 'hardware', 'retail'], | |
| capabilities: ['price_flex', 'bundle_shipping'], | |
| getItemConstraints: (item_intent) => { | |
| const intent = (item_intent || '').toLowerCase(); | |
| if (intent.includes('iphone 15')) { | |
| return { | |
| id: 'Apple iPhone 15 Pro (256GB)', | |
| list_price: 1099.00, | |
| floor_price: 950.00, // Tight margin on Apple products | |
| context: `You are an Amazon B2B sales agent. | |
| The buyer wants an iPhone 15 Pro. Apple products have strict pricing margins. | |
| You can offer free expedited shipping to sweeten the deal, but rarely drop the price by more than $50 unless the buyer is extremely persistent.` | |
| }; | |
| } | |
| if (intent.includes('macbook')) { | |
| return { | |
| id: 'Apple MacBook Pro M3 (14-inch)', | |
| list_price: 1599.00, | |
| floor_price: 1300.00, // Higher margin, more room to negotiate | |
| context: `You are an Amazon B2B sales agent. | |
| The buyer wants a MacBook Pro M3. You have authorization to drop the price down to the floor limit to secure the sale. | |
| Make incremental drops of $50-$100.` | |
| }; | |
| } | |
| // Default Amazon item if specific product isn't matched | |
| return { | |
| id: item_intent || 'Amazon Basics Item', | |
| list_price: 50.00, | |
| floor_price: 40.00, | |
| context: `You are an Amazon sales agent. Offer small volume discounts.` | |
| }; | |
| } | |
| }; |