quotesDetailSubmit: "quotesDetailSubmit" = 'quotesDetailSubmit'

Method name for PRE quotesDetailSubmitPre and POST quotesDetailSubmit

Triggered after user press an OK button in submit modal at quote detail page /#/qc/quotes/<quoteId>.

Notes: To open the submission modal, users need to click on the Submit button on the quote detail page.

Example: (Basic)

export const quotesDetailSubmit = async ({ api, quoteAPI }) => {
// TODO: Add your code
return;
}

Example: (Generate Link from Header Input and Display in Notification)

export const quotesDetailSubmit = async ({ quoteAPI, api: { notify }}) => {
const link = await quoteAPI.getHeaderInputValue('MedalliaSurveyLink');
if (link) {
await notify.success('<a href="' + link + '" target="_blank">Medallia Survey</a>', { duration: 30});
}
};

Example: (Salesforce: Create new opportunity in Salesforce)

export const quotesDetailSubmit = async ({ api: { crmManager, notify } }) => {
const opportunityUrl = await crmManager.getOpportunityURL("");

// Edit payload with your data
const payload = {
Name: "Created Opportunity from Interceptor 10",
StageName: "Prospecting",
CloseDate: "2023-06-30",
Amount: 10000,
Accountid: "0011X000018dsrMQAQ",
Description: "This is a new opportunity created from Interceptor.",
};

return crmManager
.postCall(opportunityUrl, "POST", payload)
.then((response) => {
console.log(response);
if ([200, 201].includes(response.status)) {
notify.success("Opportunity created successfully.");
} else {
notify.error(
`Failed to create opportunity. ${response.payload[0].message}`
);
}
});
};

Generated using TypeDoc