Guido Gallo
11/28/2024, 5:59 PMCeligo AI
11/28/2024, 5:59 PMAI generated answer (using internal Slack threads):Yes, it is possible to retrieve the Cost of Goods Sold (COGS) of a fulfilled order using SuiteQL. However, it's important to note that the COGS is calculated at the time of Item Fulfillment, not at the time of the Sales Order. You can use a SuiteQL query to retrieve the COGS from the GL (General Ledger) details of the Item Fulfillment. The COGS is stored in the 'cogsamount' field. Here is a sample SuiteQL query that you can modify to suit your needs:
sql
SELECT {cogsamount}
FROM {transaction}
WHERE {type} = 'Item Fulfillment'
AND {createdfrom.internalid} = 'Your Sales Order Internal ID'
Please replace 'Your Sales Order Internal ID' with the actual internal ID of your Sales Order.
Remember to ensure that you have the necessary permissions to access the 'transaction' record and the 'cogsamount' field.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
11/28/2024, 6:00 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830365658
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827647626
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821065724
Celigo AI
11/28/2024, 6:00 PMCeligo AI
11/28/2024, 6:12 PM