sendFulfillmentEmail( )


Sends a fulfillment email to a specified custom fulfiller of a line item in a given order.

The sendFulfillmentEmail() function returns a Promise that is resolved when the fulfillment email for the specified order is sent to the specified custom fulfiller. A custom fulfiller is a fulfiller that is not integrated with the Wix App Market. Learn more about Connecting Your Wix Store to a Fulfillment Service.

Method Declaration
Copy
function sendFulfillmentEmail(
  orderId: string,
  fulfillerId: string,
): Promise<void>;
Method Parameters
orderIdstringRequired

ID of the order for fulfillment.


fulfillerIdstringRequired

ID of the custom fulfiller.

JavaScript
/*********************************** * Backend code - fulfillments.jsw * ***********************************/ import wixStoresBackend from "wix-stores-backend"; export function sendFulfillmentEmail(orderId, fulfillerId) { return wixStoresBackend.sendFulfillmentEmail(orderId, fulfillerId); } /************** * Page code * **************/ import { sendFulfillmentEmail } from "backend/fulfillments"; export function button1_click(event) { $w("#thankYouPage1") .getOrder() .then((order) => { sendFulfillmentEmail(order._id, order.lineItems[0].fulfillerId) .then(() => { // Fulfillment email sent }) .catch((error) => { // Fulfillment email not sent console.log(error); }); }); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?