moqui / mantle-usl

Mantle Universal Service Library
http://www.moqui.org/mantle.html
Other
30 stars 61 forks source link

add service to add lead and related company in a single service #124

Closed hansbak closed 6 years ago

hansbak commented 6 years ago

This service is used in the upcoming leads screens

jonesde commented 6 years ago

A few notes from review...

The lookup to find the first StatusItem is odd, especially since by the service name it is implied it would be the Lead customer status. This points to the fact that there are not yet any default party customer statuses, and to have fully functional OOTB functionality that would be required in the system.

Minor stuff: element not indented, log statement should be commented or removed.

Stepping back a little, and before reviewing further... this service is highly redundant with the PartyServices.create#PersonCustomer service. That already has a 'accountPartyId' parameter that is treated similar to the organizationPartyId in your service. For more on that see the mantle/sales/AccountServices.xml file. An accountName field to match could be used to create an organization with the 'Sales Account' role. Finally a customerStatusId in-parameter could be added to handle that part of it.

The general idea in mantle-usl is to make services with more options like this instead of an explosion of more special case services.

hansbak commented 6 years ago

ok now using standard services