Is createPriceQuote( ) broken?

What Works:

What Does Not Work:

  • Price quotes fail to convert an invoice, manually or automatically upon acceptance

  • Manual attempts fail with a red banner at the top of the dashboard that states: “:warning: Something went wrong. Try again later.”

  • Price quotes will not open in the Wix dashboard editor

  • Silently fails with an empty editor window

Can anyone offer any insight or potential solutions?

Is this a new issue, or was it working before?

Share the relevant code in a code block as stated in the Forum Guidelines .

This has never worked for me.

This code creates the conditions necessary to reproduce the bugs described in my parent post.

import wixCrm from 'wix-crm';
import { getContact } from 'backend/quoteme';
import { createPriceQuote } from 'backend/quoteme';

$w.onReady(function () {

    $w('#Submit').onClick(() => {

 const now = new Date()
 let dueDate = new Date("Nov 3, 2024")

 let inputEmail = 'quoteymctest@gabe.wtf';
 let inputFirstName = 'Quotey';
 let inputLastName = 'McTest';
 let inputWidgets = '42'

 let CRMContact = {
 "firstName": inputFirstName,
 "lastName": inputLastName,
 "emails": [inputEmail],
 "labels": ["Quoted2021"],
        };

        wixCrm.createContact(CRMContact)
            .then(contactId => {

 let QuoteCustomer = {
 "contactId": contactId,
 "email": inputEmail,
 "address": {
 "city": '',
 "subdivision": '',
 "postalCode": '',
 "country": '',
 "addressLine": '',
 "formatted": '',
                    },
 "company": '',
 "fullname": '',
 "firstName": inputFirstName,
 "lastName": inputLastName,
                };

 var discopercento
 if (inputWidgets > 69) {
                    discopercento = 30
                } else if (inputWidgets > 49 && inputWidgets < 70) {
                    discopercento = 20
                } else if (inputWidgets > 29 && inputWidgets < 50) {
                    discopercento = 10
                } else {
                    discopercento = 0
                }

 let lineItems = [{
 "id": "00001",
 "name": "Premium Widget",
 "description": "Top Quality",
 "price": 10.00,
 "quantity": inputWidgets,
                    },
                    {
 "id": "00002",
 "name": "Free Operator License",
 "description": "",
 "price": 0.00001,
 "quantity": 1,
                    },
                    {
 "id": "00003",
 "name": "Features",
 "description": "• Hand Made • 100% Pure • Automatic Operation • Advanced Technology",
 "price": 0.00001,
 "quantity": 1,
                    },
                    {
 "id": "00004",
 "name": "Comprehensive training video",
 "description": "",
 "price": 0.00001,
 "quantity": 1,
                    },
                    {
 "id": "00005",
 "name": "E-mail access to professional widget engineers",
 "description": "",
 "price": 0.00001,
 "quantity": 1,
                    }
                ];

 let discount = {
 "value": discopercento,
 "type": "Percentage"
                };

 let paymentTerms = {
 "termData": "",
 "termType": "Other"
                };

 let metadata = {
 "notes": "Thank you for your interest in purchasing a 100% authentic hand made Acme Widget of premium organic quality, and advanced technical sophistication.",
 "legalTerms": "",
 "sourceUrl": "",
 "source": "",
 "sourceRefId": ""
                };

 let dates = {
 "issueDate": now,
 "validThroughDate": dueDate,
                };

 let createPriceQuoteFields = {
 "title": "Acme Widget",
 "customer": QuoteCustomer,
 "currency": "USD",
 "lineItems": lineItems,
 "discount": discount,
 "paymentTerms": paymentTerms,
 "metadata": metadata,
 "dates": dates
                };

                createPriceQuote(createPriceQuoteFields)
                    .then(id => {
                        console.log(id);

                    });

            });
    });
});
// Filename: backend/quoteme.jsw (web modules need to have a .jsw extension)

import wixCrmBackend from 'wix-crm-backend';
import wixBillingBackend from 'wix-billing-backend';
import { priceQuotes } from 'wix-billing-backend';

export function getContact(contactId) {
 return wixCrmBackend.getContactById(contactId);
}

export function createPriceQuote(createPriceQuoteFields) {
 return priceQuotes.createPriceQuote(createPriceQuoteFields);
}

It appears that your problem is not code related since you state that " Price quotes fail to convert an invoice". My understanding is that the price quote is created OK, but the user’s acceptance fails to create an invoice.

You should contact Wix Customer Care , as they will be better able to evaluate your issue and provide the proper assistance.

Thank you, Yisrael.

The price quote gets created, but it cannot be converted to an invoice automatically or manually. Unless I have coded something incorrectly, the API call is broken because it generates price quotes which cannot be converted to sales.

I first contacted Wix Customer Care about this issue on October 27. Since that time I have communicated with 4 different reps in that support ticket, however none have been able to offer a solution. My last reply to them included a link to this forum thread.

I then contacted a Wix Account Executive on October 30 and offered to buy into the Agency Partnership Program in exchange for support on this issue. My offer was declined.

Finally I created this forum post on November 2 in hopes that the community might be able to fill the gaps in support left by Wix. Can anyone offer any further insights or help on ANY of the above?

I just wanted to clarify that I am able to manually create and convert price quotes without errors in the Ascend web UI. This problem only presents itself with price quotes created via the API.

I’m also still looking for help resolving this. Has anyone had any luck?

Thank you!