Search...
sendPriceQuote( )
Sends a price quote preview link to a customer via email.
Description
The sendPriceQuote()
function returns a Promise that resolves
when the price quote with the specified ID and version is sent to the customer
listed on the price quote.
Use the emailOptions
parameter to specify the subject and body of the email
sent to the customer.
Syntax
function sendPriceQuote(id: IdAndVersion, emailInfo: EmailInfo): Promise<void>
sendPriceQuote Parameters
NAME
TYPE
DESCRIPTION
id
IdAndVersion
ID and version of the price quote to send.
emailInfo
EmailInfo
Information used when sending the email.
Returns
Fulfilled - When the specified price quote is sent.
Return Type:
Promise<void>
Was this helpful?
Send a price quote to a customer
Copy Code
1import { Permissions, webMethod } from 'wix-web-module';2import { priceQuotes } from 'wix-billing-backend';34export const sendPriceQuote = webMethod(Permissions.Anyone, (id, version, subject, body) => {5 const idAndVersion = {6 "id": id,7 "version": version8 };910 const emailInfo = {11 "subject": subject,12 "body": body13 };1415 return priceQuotes.sendPriceQuote(idAndVersion, emailInfo);16});
Get the price quote version and send the price quote to a customer
Copy Code
1import { Permissions, webMethod } from 'wix-web-module';2import { priceQuotes } from 'wix-billing-backend';34export const sendPriceQuoteToCustomer = webMethod(Permissions.Anyone, (id, subject, body) => {5 const emailInfo = {6 "subject": subject,7 "body": body8 };910 return priceQuotes.getPriceQuote(id)11 .then( (result) => {12 return priceQuotes.sendPriceQuote(result.id, emailInfo);13 } );14});