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 {priceQuotes} from 'wix-billing-backend';
2
3export function sendPriceQuote(id, version, subject, body) {
4 const idAndVersion = {
5 "id": id,
6 "version": version
7 };
8
9 const emailInfo = {
10 "subject": subject,
11 "body": body
12 };
13
14 return priceQuotes.sendPriceQuote(idAndVersion, emailInfo);
15}
Get the price quote version and send the price quote to a customer

Copy Code
1import {priceQuotes} from 'wix-billing-backend';
2
3export function sendPriceQuoteToCustomer(id, subject, body) {
4 const emailInfo = {
5 "subject": subject,
6 "body": body
7 };
8
9 return priceQuotes.getPriceQuote(id)
10 .then( (result) => {
11 return priceQuotes.sendPriceQuote(result.id, emailInfo);
12 } );
13}