Table of Contents

CRM1002 Create Offers

General Information

Module Crm.Presales
Code CRM1002
Parent Document Deals
Sub-document Offers
Full Name Create Offers
Deterministic YES
Status ACTIVE
Supports Transitional Documents NO
Supports Single Execution YES
Replaces GenerateOffer
Orphan Rows None
Introduced In Version 2018.2
Date of Suspension -

Business Logic

The current generation procedure is meant to create template offers from a Deal.

The fields in the Offer’s header are filled as follows:

Offer.DocumentDate = Deal.DocumentDate
Offer.Customer = 
if (Count(Customers, where Party == Deal.Party && (EnterpriseCompany == Offer.EnterpriseCompany || EnterpriseCompany == null) && Active == True) > 0)
, then Customer = the determined Customer for the Deal.Party
, else Customer = null
Offer.DocumentCurrency = Offer.EnterpriseCompany.BaseCurrency 
Offer.Deal = Deal 
Offer.SalesPerson = Deal.LeadingSalesPerson
Offer.RequiredDeliveryDate = DocumentDate
Offer.PaymentDueDate = DocumentDate
Offer.PriceList = null
Offer.PaymentType = null
Note

The attributes which are not specified here are filled in as described in Standard Document Attributes

Fulfillments

No fulfilments and metrics are used for the current generation procedure. Each time the procedure is started, it creates new sub-document no matter if there are documents already created from previous procedure executions.


The new Offer Line is created as follows:

OfferLine.LineNo = DealLine.LineNo

OfferLine.Product = DealLine.Product

OfferLine.ProductDescription = OfferLine.Product.Name

OfferLine.GuaranteePeriodDays = OfferLine.Product.GuaranteePeriodDays

OfferLine.ProductCode = NULL

OfferLine.ProductPrice = loaded by the 'Determine product price'* method

OfferLine.UnitPrice = loaded by the 'Calculate Unit Price' method

OfferLine.Quantity = DealLine.Quantity

OfferLine.QuantityUnit = DealLine.QuantityUnit

OfferLine.QuantityBase = CONVERT(OfferLine.Quantity, OfferLine.Product.BaseMeasurementCategory.BaseUnit)

OfferLine.StandardQuantityBase = CONVERT(OfferLine.Quantity, OfferLine.Product.BaseMeasurementCategory.BaseUnit)

OfferLine.LineDiscount = loaded by the 'Determine line discount'* method

OfferLine.LineStandardDiscountPercent = if (OfferLine.LineDiscount != null)
                                        , then OfferLine.LineStandardDiscountPercent = OfferLine.LineDiscount.DiscountPercent
                                        , else OfferLine.LineStandardDiscountPercent = 0.00%   

OfferLine.LineCustomDiscountPercent = 0.00%

OfferLine.LineAmount = loaded by the 'Determine line amount in sales orders'* method

OfferLine.LineEndCustomerParty = NULL

OfferLine.RequiredDeliveryDate = Offer.RequiredDeliveryDate

OfferLine.DeliveryTermDays = 0

OfferLine.Variant = NULL

OfferLine.ChoiceGroupName = NULL

OfferLine.Notes = DealLine.Notes

OfferLine.IsSelected = true

*Determine product price

*Determine line discount

*Determine line amount in sales orders