We are building a Sales CRM type of Application where we want to provide bulk Upload API.

I am using Lagom, there i cannot update multiple Aggregate in one transaction, how should i do it.

I have read other people API and they understand bulk differently than manual operation on one Aggregate.

Reference FreshSales API:

When i do a Bulk Update there , a Rule which says on Lead Update Send a Email. They do not send when its done through Bulk Operation and send when its through manual operation on UI.

This means they specially understand bulk vs manual when performing operations.

Any specifc reason

  • ..because they dont want to send emails on a bulk insert? – Ewan Aug 10 at 11:24
  • my doubt is it more relates to scalability of the platform, otherwise they could have sent email on each Lead Creation. As in my case i am using event sourcing, for not sending email, i would have to do special check – techagrammer Aug 10 at 14:38
  • I think its a fairly common business requirement. I've certainly done different flows for bulk imports vs 'the normal process' with ES either make a subclass and override the creation event or make two methods 'create' and 'bulkcreate' – Ewan Aug 10 at 15:06
  • @king-side-slide one of the many benefits of ES other than audit trails :) – Ewan Aug 10 at 15:09
  • Also @ewan i have one more doubt in ddd , how to make a api which work with multiple aggregate , eg: while converting a lead , a contact and a opportunity has to be created . One sol. First create contact , then opportunity , then mark lead as converted , problem in this is if two person calling the api for the same lead to convert , multiple contact can be created , what to do for this – techagrammer Aug 10 at 16:30

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.