within one entity, if more than 1 request is planned, then always a batch.
If different entities, then different batches - each entity has its own batch.
I understand that this way the developer has to think less, and the solution can be made faster
Several entities too. Right now the project: a Case is taken and then - a Contact, a Company and a Deal, possibly related to it. Then, perhaps, Contacts and a Company related to the received Deal will be added. Since it's all the same one hit - pull as much as possible
foreach ($this->serviceBuilder->getCRMScope()->deal()->batch->add($rawDeals) as $addDealResult) {
$dealIdList[] = $addDealResult->getId();
}
via a generator? And how are the added transactions and their ids compared? i.e. if I add data via REST, and then in the local system I need to link the transaction id (for some reason) to each individual entity that I added, then how?
good question, I solve it like this: this is the developer's area of responsibility, in the client code let him decide what he needs there.
if we are talking about the connection of entities in two systems, then you should have a field by which the connection goes, some kind of UUID, well, actually you have:
there is system A in which there is data and uuid
you sent an array of transactions to B24 that have these uuid in the user field
they returned their id (added) to you
by id you selected and compared
of course you can use the keys of the array with transactions as identifiers and pass them along, for example
I haven't tried your library, maybe you can implement the adding method in a different way, and this is additional "sugar" for a private case
off the top of my head there are many options: allow you to set a request code and get a response/callback using it (with passing custom data/request to the method, along with the result)/return the request and response in an iterator
Description
User feature requests
Read mode
Example
Write mode
Example
No response