Service - Sell Offer Auction Standard

From Izara Wiki
Revision as of 23:25, 16 August 2025 by Sven the Barbarian (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Sell Offer Auction Standard are time based offers for a product that buyers can bid on with a limited number of units available.

Auctions do not have a fixed price structure, have settings such as minimum bid and reserve price.

Examples

  • Selling a unique item and allowing buyers to bid for the price they are prepared to pay
  • Clearing stock at any price

Notes

  • Due to the transparent nature of the marketplace, bids and minimum price to sell (reserve) will be public
  • May need scheduled event for when the auction ends to trigger flow standardAuctionEnds

Pricing for multiple units

  • auction can have multiple units
  • all units remain available until the auction ends
  • highest bidder receives units requested at their bid price, second highest bidder gets units at their bid, and so on

Repository

https://bitbucket.org/izara-market-services/izara-market-products-sell-offer-auction-standard

Object Schemas

Additional Information
Per Service Schemas

objType

sellOfferAuctionStandard

{
	objectType: "sellOfferAuctionStandard",
	extendObjType: {
		serviceTag: "sellOfferManager",
		objectType: "sellOffer"
	},
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		minimumQuantity: { // bids must be for this quantity or larger
			type: "number",
			requiredOnCreate: true,
			storageResourceTags: ['myGraph']		
		}
		"scheduledEndTime":{ // initial endTime set by seller
			type: "timestamp",
			requiredOnCreate: true,
			storageResourceTags: ['myGraph']		
		},
		"auctionEndTime":{ // currentEndTime setting
			type: "timestamp",
			canUpdate: true,
			requiredOnCreate: true,
			storageResourceTags: ['myGraph']		
		},
		"autoExtendAuction":{
			type: "boolean",
			requiredOnCreate: true,
			storageResourceTags: ['myGraph']		
		},
		"extendIfWithinSeconds":{ // number of seconds before endTime when endTime will be extended
			type: "number",
			storageResourceTags: ['myGraph']		
		},
		"autoExtendSeconds":{ // number of seconds to add if bid placed 
			type: "number",
			storageResourceTags: ['myGraph']		
		},
		"immediateSalePrice":{ // if a buyer wants to buy immediately without bidding can pay this price
			type: "number",
			storageResourceTags: ['myGraph']
		},
    },
	//* should already exist in sellOffer objType
	canDelete: false,
	belongTo: { //* should already exist in sellOffer objType
		serviceTag: "user",
		objectType: "user"
	},
}
  • maybe add highestBid field for easy querying, or perhaps cache somewhere and invalidate cache when change

auctionStandardBid

{
	objectType: "auctionStandardBid",
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
	canDelete: false,
    fieldNames: {
		auctionStandardBidId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		}
		minimumQuantity: {
			type: "number",
			requiredOnCreate: true,
			storageResourceTags: ['myGraph']		
		}
		price: {
			type: "number",
			requiredOnCreate: true,
			storageResourceTags: ['myGraph']		
		}
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "auctionStandardBidId"
		}
    ]

}

Object Relationships

placedAuctionStandardBid

{
	"placedAuctionStandardBid": {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "user",
						objectType: "user"
					},
					linkType: "one",
				},
				to: {
					objType: {
						serviceTag: "sellOfferAuctionStandard",
						objectType: "sellOfferAuctionStandard"
					},
					linkType: "many"
				}
			}
		]
	}
}
  • links a user to a bid
  • if user wants to increase their bid they can make a new bid, old bid remains

forAuctionStandard

{
	"forAuctionStandard": {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "sellOfferAuctionStandard",
						objectType: "auctionStandardBid"
					},
					linkType: "many",
				},
				to: {
					objType: {
						serviceTag: "sellOfferAuctionStandard",
						objectType: "sellOfferAuctionStandard"
					},
					linkType: "one"
				}
			}
		]
	}
}
  • links a bid to a sellOfferAuctionStandard

extendsAuctionEndTime

{
	"extendsAuctionEndTime": {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		fieldNames: {
			"newAuctionEndTime": { // the new endTime setting made by this bid
				type: "timestamp",
				requiredOnCreate: true,
			},
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "sellOfferAuctionStandard",
						objectType: "auctionStandardBid"
					},
					linkType: "many",
				},
				to: {
					objType: {
						serviceTag: "sellOfferAuctionStandard",
						objectType: "sellOfferAuctionStandard"
					},
					linkType: "one"
				}
			}
		]
	}
}
  • if a bid causes the endTime of an auction to extend, create relationship and set the newEndTime in relationship

Flows

bidPlaced

{ 
	flowTag: "bidPlaced",
	handleObj: "one",
	statusType: "none",
	event:["ownTopic"],
	outputTopic: true,
    stepProperties:{
		"uuid1":{
			objectField:{ 
				objType:{
					serviceTag: "sellOfferAuctionStandard",
					objectType: "auctionStandardBid" 
				},
				fieldName:"auctionStandardBidId"
			},
		},
		"uuid2":{
			objectField:{ 
				objType:{
					serviceTag: "sellOfferAuctionStandard",
					objectType: "sellOfferAuctionStandard" 
				},
				fieldName:"sellOfferAuctionStandardId"
			},
		},
    },
	flowSteps:{
		In:{
			properties:["uuid1"], // can query auctionStandardBid to find link to sellOfferAuctionStandard
		},
		Out:{
			properties:["uuid1"],
		},
	}
}
  • when a standard bid is placed

immediateSale

{ 
	flowTag: "immediateSale",
	handleObj: "one",
	statusType: "none",
	event:["ownTopic"],
	outputTopic: true,
    stepProperties:{
		"uuid1":{
			objectField:{ 
				objType:{
					serviceTag: "sellOfferAuctionStandard",
					objectType: "sellOfferAuctionStandard" 
				},
				fieldName:"sellOfferAuctionStandardId"
			},
		},
		"uuid2":{
			propertyName: "quantity",
			type: "number",
		},
    },
	flowSteps:{
		In:{
			properties:["uuid1", "uuid2"],
		},
		Out:{
			properties:["uuid1", "uuid2"],
		},
	}
}
  • when an immediate sale is submitted

auctionEnds

{ 
	flowTag: "auctionEnds",
	handleObj: "one",
	statusType: "none",
	event:["ownTopic"],
	outputTopic: true,
    stepProperties:{
		"uuid1":{
			objectField:{ 
				objType:{
					serviceTag: "sellOfferAuctionStandard",
					objectType: "sellOfferAuctionStandard" 
				},
				fieldName:"sellOfferAuctionStandardId"
			},
		},
    },
	flowSteps:{
		In:{
			properties:["uuid1"],
		},
		Out:{
			properties:["uuid1"],
		},
	}
}
  • when the auction ends

Working documents

Sell Offer Auction Standard