Webhooks & Firehoses
FD1 SalesBuilder
SalesBuilder functions are used to create and manipulate sales as they are assembled. SalesBuilder implements shopping cart functionality or allows you to create instore checkouts.
You do not need to use SalesBuilder functions to create new sales, you can simply send a complete sale definition into fd1.sales.sale_save_new
Index
- salesbuilder.sale_create
- salesbuilder.sale_set_customer
- salesbuilder.sale_add_product
salesbuilder.sale_create
{ a: "fd1.salesbuilder.sale_create", }
{ r: "fd1.salesbuilder.sale_create", data: { rows: [ { physkey: "jafj459385hggdg39vgcg53038qQQ8", startdt: "2024-02-04 14:45:23", ... } ] } }
salesbuilder.sale_fetch
Example
{ a: "fd1.salesbuilder.sale_fetch", k: "jafj459385hggdg39vgcg53038qQQ8" }
salesbuilder.sale_get_price
Example
{ a: "fd1.salesbuilder.sale_get_price", rq: 92838, k: "jafj459385hggdg39vgcg53038qQQ8", v: { pid: [ 1256, 8231 ] } }
{ r: "fd1.salesbuilder.sale_park", rp: 92838, k: "jafj459385hggdg39vgcg53038qQQ8", data: { rows: [ { pid: 1256, price: 19.95 }, { pid: 8231, price: 17.20 } ] } }
Alternatively a key/value response format can be requested; this may be easier to work with in some circumstances
{ a: "fd1.salesbuilder.sale_get_price", rq: 92838, k: "jafj459385hggdg39vgcg53038qQQ8", v: { _format: "kv", pid: [ 1256, 8231 ] } }
{ r: "fd1.salesbuilder.sale_park", rp: 92838, k: "jafj459385hggdg39vgcg53038qQQ8", data: { kv: { "1256": 19.95, "8231": 17.20 } } }
salesbuilder.sale_add_product
salesbuilder.sale_edit_product
salesbuilder.sale_set_delivery_address
salesbuilder.sale_set_customer
salesbuilder.sale_add_payment
salesbuilder.sale_edit_payment
salesbuilder.sale_invoke_eftpos
Starts an integrated Eftpos payment sequence. The exact action varies depending on the Eftpos provider in use.
Example
{ a: "fd1.salesbuilder.sale_invoke_eftpos", k: "jafj459385hggdg39vgcg53038qQQ8", v: { amount: 56.00 } }
salesbuilder.sale_park
Example
{ a: "fd1.salesbuilder.sale_park", k: "jafj459385hggdg39vgcg53038qQQ8" }
{ r: "fd1.salesbuilder.sale_park", k: "jafj459385hggdg39vgcg53038qQQ8" }
salesbuilder.sale_unpark
Example
{ a: "fd1.salesbuilder.sale_unpark", k: "jafj459385hggdg39vgcg53038qQQ8" }
{ r: "fd1.salesbuilder.sale_unpark", k: "jafj459385hggdg39vgcg53038qQQ8", data: { ... sale definition ... } }
salesbuilder.sale_void
Marks a sale as void and stores it for audit purposes.
Example
{ a: "fd1.salesbuilder.sale_void", k: "jafj459385hggdg39vgcg53038qQQ8" }
{ r: "fd1.salesbuilder.sale_void", k: "jafj459385hggdg39vgcg53038qQQ8" }