-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathSalesEntities.xml
More file actions
166 lines (156 loc) · 9.29 KB
/
Copy pathSalesEntities.xml
File metadata and controls
166 lines (156 loc) · 9.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a
Grant of Patent License.
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty.
You should have received a copy of the CC0 Public Domain Dedication
along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/entity-definition-3.xsd">
<!-- ========================================================= -->
<!-- - mantle.sales.opportunity -->
<!-- - mantle.sales.forecast -->
<!-- - mantle.sales.need -->
<!-- ========================================================= -->
<!-- ========================================================= -->
<!-- mantle.sales.opportunity -->
<!-- ========================================================= -->
<entity entity-name="SalesOpportunity" package="mantle.sales.opportunity">
<field name="salesOpportunityId" type="id" is-pk="true"/>
<field name="typeEnumId" type="id"/>
<field name="accountPartyId" type="id"/>
<field name="opportunityName" type="text-medium"/>
<field name="description" type="text-very-long"/>
<field name="nextStep" type="text-long"/>
<field name="estimatedAmount" type="currency-amount" enable-audit-log="true"/>
<field name="estimatedProbability" type="number-decimal" enable-audit-log="true"/>
<field name="estimatedCloseDate" type="date-time"/>
<field name="currencyUomId" type="id"/>
<field name="marketingCampaignId" type="id"/>
<field name="dataSourceId" type="id"/>
<field name="opportunityStageId" type="id" enable-audit-log="true"/>
<relationship type="one" title="SalesOpportunityType" related="moqui.basic.Enumeration">
<key-map field-name="typeEnumId"/></relationship>
<relationship type="one" title="Account" related="mantle.party.Party">
<key-map field-name="accountPartyId"/></relationship>
<relationship type="one" title="Currency" related="moqui.basic.Uom">
<key-map field-name="currencyUomId"/></relationship>
<relationship type="one" related="mantle.sales.opportunity.SalesOpportunityStage">
<key-map field-name="opportunityStageId"/></relationship>
<relationship type="one" related="mantle.marketing.campaign.MarketingCampaign"/>
</entity>
<entity entity-name="SalesOpportunityParty" package="mantle.sales.opportunity">
<field name="salesOpportunityId" type="id" is-pk="true"/>
<field name="partyId" type="id" is-pk="true"/>
<field name="roleTypeId" type="id" is-pk="true"/>
<field name="fromDate" type="date-time" is-pk="true"/>
<field name="thruDate" type="date-time"/>
<relationship type="one" related="mantle.sales.opportunity.SalesOpportunity">
<key-map field-name="salesOpportunityId"/></relationship>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" related="mantle.party.RoleType"/>
</entity>
<entity entity-name="SalesOpportunityStage" package="mantle.sales.opportunity">
<field name="opportunityStageId" type="id" is-pk="true"/>
<field name="description" type="text-medium"/>
<field name="defaultProbability" type="number-decimal"/>
<field name="sequenceNum" type="number-integer"/>
</entity>
<entity entity-name="SalesOpportunityWorkEffort" package="mantle.sales.opportunity">
<field name="salesOpportunityId" type="id" is-pk="true"/>
<field name="workEffortId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.sales.opportunity.SalesOpportunity"/>
<relationship type="one" related="mantle.work.effort.WorkEffort"/>
</entity>
<entity entity-name="SalesOpportunityOrder" package="mantle.sales.opportunity">
<description>Associate orders (including proposed/quote orders) with an opportunity</description>
<field name="salesOpportunityId" type="id" is-pk="true"/>
<field name="orderId" type="id" is-pk="true"/>
<relationship type="one" related="mantle.sales.opportunity.SalesOpportunity"/>
<relationship type="one" related="mantle.order.OrderHeader"/>
</entity>
<entity entity-name="SalesOpportunityCompetitor" package="mantle.sales.opportunity">
<field name="salesOpportunityId" type="id" is-pk="true"/>
<field name="competitorPartyId" type="id" is-pk="true"/>
<field name="positionEnumId" type="id"/>
<field name="strengths" type="text-long"/>
<field name="weaknesses" type="text-long"/>
<relationship type="one" related="mantle.sales.opportunity.SalesOpportunity"/>
</entity>
<entity entity-name="SalesOpportunityTracking" package="mantle.sales.opportunity">
<field name="salesOpportunityId" type="id" is-pk="true"/>
<field name="trackingCodeId" type="id" is-pk="true"/>
<field name="receivedDate" type="date-time"/>
<relationship type="one" related="mantle.sales.opportunity.SalesOpportunity"/>
<relationship type="one" related="mantle.marketing.tracking.TrackingCode"/>
</entity>
<!-- ========================================================= -->
<!-- mantle.sales.forecast -->
<!-- ========================================================= -->
<entity entity-name="SalesForecast" package="mantle.sales.forecast">
<field name="salesForecastId" type="id" is-pk="true"/>
<field name="parentSalesForecastId" type="id"/>
<field name="organizationPartyId" type="id"/>
<field name="internalPartyId" type="id"/>
<field name="timePeriodId" type="id"/>
<field name="currencyUomId" type="id"/>
<field name="quotaAmount" type="currency-amount"/>
<field name="forecastAmount" type="currency-amount" enable-audit-log="true"/>
<field name="bestCaseAmount" type="currency-amount"/>
<field name="closedAmount" type="currency-amount" enable-audit-log="true"/>
<field name="percentOfQuotaForecast" type="number-decimal"/>
<field name="percentOfQuotaClosed" type="number-decimal"/>
<field name="pipelineAmount" type="currency-amount"/>
<relationship type="one" title="Parent" related="mantle.sales.forecast.SalesForecast">
<key-map field-name="parentSalesForecastId" related="salesForecastId"/></relationship>
<relationship type="one" title="Organization" related="mantle.party.Party">
<key-map field-name="organizationPartyId"/></relationship>
<relationship type="one" title="Internal" related="mantle.party.Party">
<key-map field-name="internalPartyId"/></relationship>
<relationship type="one" related="mantle.party.time.TimePeriod"/>
<relationship type="one" title="Currency" related="moqui.basic.Uom">
<key-map field-name="currencyUomId"/></relationship>
</entity>
<entity entity-name="SalesForecastDetail" package="mantle.sales.forecast">
<field name="salesForecastId" type="id" is-pk="true"/>
<field name="salesForecastDetailSeqId" type="id" is-pk="true"/>
<field name="amount" type="currency-amount"/>
<field name="quantity" type="number-decimal"/>
<field name="quantityUomId" type="id"/>
<field name="productId" type="id"/>
<field name="productCategoryId" type="id"/>
<relationship type="one" related="SalesForecast"/>
<relationship type="one" title="Quantity" related="moqui.basic.Uom">
<key-map field-name="quantityUomId"/></relationship>
<relationship type="one" related="mantle.product.Product"/>
<relationship type="one" related="mantle.product.category.ProductCategory"/>
</entity>
<!-- ========================================================= -->
<!-- mantle.sales.need -->
<!-- ========================================================= -->
<entity entity-name="PartyNeed" package="mantle.sales.need">
<field name="partyNeedId" type="id" is-pk="true"/>
<field name="needTypeEnumId" type="id"/>
<field name="partyId" type="id"/>
<field name="roleTypeId" type="id"/>
<field name="communicationEventId" type="id"/>
<field name="productId" type="id"/>
<field name="productCategoryId" type="id"/>
<field name="visitId" type="id"/>
<field name="datetimeRecorded" type="date-time"/>
<field name="description" type="text-medium"/>
<relationship type="one" title="NeedType" related="moqui.basic.Enumeration">
<key-map field-name="needTypeEnumId"/></relationship>
<relationship type="one" related="mantle.party.Party"/>
<relationship type="one" related="mantle.party.RoleType"/>
<relationship type="one" related="mantle.party.communication.CommunicationEvent"/>
<relationship type="one" related="mantle.product.Product"/>
<relationship type="one" related="mantle.product.category.ProductCategory"/>
<relationship type="one-nofk" related="moqui.server.Visit"/>
</entity>
</entities>