Search...
onPriceQuoteAccepted( )
An event that fires when a price quote is accepted.
Description
The onPriceQuoteAccepted()
event handler runs when a price quote is accepted. The received PriceQuote
object contains information about the price quote that was accepted.
Note: Backend events don't work when previewing your site.
Syntax
function onPriceQuoteAccepted(event: PriceQuote): void
onPriceQuoteAccepted Parameters
NAME
TYPE
DESCRIPTION
event
PriceQuote
The price quote that was accepted.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
An event when a price quote is accepted
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.34export function wixBilling_onPriceQuoteAccepted(event) {5 let invoiceId = event.id.id;6 let email = event.customer.email;7}89/* Full event object:10 *11 * {12 * "id":{13 * "id": "411a5551-b0f6-4826-8a41-ebae2879f857",14 * "version": 2515 * },16 * "status": "Accepted",17 * "number": "0000001",18 * "title": "My Price Quote",19 * "currency": "USD",20 * "customer": {21 * "contactId": "4f7c6637-0657-4696-a00b-9bc2ae4e035d",22 * "email": "john.doe@somedomain.com",23 * "address": {24 * "country": "USA",25 * "subdivision": "NY",26 * "city": "New York",27 * "postalCode": "10011",28 * "streetAddress": {29 * "value": "235 W 23rd St",30 * "type": "Name"31 * },32 * "addressLine": "someStreet",33 * "formatted": "235 W 23rd St, New York, NY 10011, USA"34 * },35 * "billingAddress": {36 * "country": "USA",37 * "streetAddress": {38 * "value": "235 W 23rd St",39 * "type": "Name"40 * },41 * "addressLine": "235 W 23rd St, New York, NY 10011, USA",42 * "postalCode": "10011",43 * "subdivision": "NY",44 * "city": "New York",45 * "formatted": "235 W 23rd St, New York, NY 10011, USA"46 * },47 * "shippingAddress": {48 * "country": "USA",49 * "streetAddress": {50 * "value": "235 W 23rd St",51 * "type": "Name"52 * },53 * "addressLine": "235 W 23rd St, New York, NY 10011, USA",54 * "postalCode": "10011",55 * "subdivision": "NY",56 * "city": "New York",57 * "formatted": "235 W 23rd St, New York, NY 10011, USA"58 * },59 * "phone": "5555555555",60 * "company": "Some Company",61 * "companyId": "Some Company Id",62 * "fullName": "John Doe",63 * "firstName": "John",64 * "lastName": "Doe"65 * },66 * "dates": {67 * "issueDate": 2019-03-13T00:00:00.000Z,68 * "validThroughDate": 2019-06-12T00:00:00.000Z,69 * "lastSeenDate": 2019-03-14T00:00:00.000Z70 * },71 * "discount": {72 * "value": 2.5,73 * "type": "Fixed"74 * },75 * "lineItems":[76 * {77 * "id": "00001",78 * "name": "Item 1",79 * "description": "First Item",80 * "price": 10.5,81 * "quantity": 3,82 * "taxes": [83 * {84 * "name": "tax name",85 * "rate": 8.5,86 * "code": "tax code"87 * }88 * ]89 * },90 * {91 * "id": "00002",92 * "name": "Item 2",93 * "description": "Second Item",94 * "price": 50,95 * "quantity": 1,96 * "taxes": [97 * {98 * "name": "tax name",99 * "rate": 8.5,100 * "code": "tax code"101 * }102 * ]103 * }104 * ],105 * "locale": {106 * "language": "en"107 * },108 * "totals": {109 * "discountAmount": null,110 * "taxedAmount": 6.93,111 * "fees": [],112 * "subtotal": 81.5,113 * "total": 88.43114 * },115 * "taxes": [116 * {117 * "name": "tax name",118 * "rate": 8.5,119 * "taxable": 81.5,120 * "taxed": 6.93,121 * "code": "tax code"122 * }123 * ],124 * "metadata": {125 * "notes": "Some note.",126 * "legalTerms": "Some legal terms",127 * "sourceUrl": "http://legalurl.com",128 * "source": "Some source",129 * "sourceRefId": "Some source ref id"130 * },131 * "paymentTerms": {132 * "termType": "DueOnReceipt",133 * "termData": "some term data"134 * }135 * }136 */