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';
3
4export const sendPriceQuote = webMethod(Permissions.Anyone, (id, version, subject, body) => {
5 const idAndVersion = {
6 "id": id,
7 "version": version
8 };
9
10 const emailInfo = {
11 "subject": subject,
12 "body": body
13 };
14
15 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';
3
4export const sendPriceQuoteToCustomer = webMethod(Permissions.Anyone, (id, subject, body) => {
5 const emailInfo = {
6 "subject": subject,
7 "body": body
8 };
9
10 return priceQuotes.getPriceQuote(id)
11 .then( (result) => {
12 return priceQuotes.sendPriceQuote(result.id, emailInfo);
13 } );
14});