elasticio / pipedrive-component

Pipedrive CRM integration component for elastic.io
Apache License 2.0
0 stars 4 forks source link

Optional behavior for Deal creation #5

Closed AlpBilgin closed 7 years ago

AlpBilgin commented 7 years ago
AlpBilgin commented 7 years ago

Partially solves #4 edit: @zubairov: Solves the first header of the original post

zubairov commented 7 years ago

Nice one. It's definitely going into right direction, but tbh I expected 3 (or more) actions instead of one complicated action with more logic inside. Why wouldn't we use e.io integrator's creativity to 'design' the logic instead of hardcoding it into the one single action?

Can you split this one large action into three, e.g.

AlpBilgin commented 7 years ago

Hello @zubairov,

I have created an action for each object type. They look for a particular id number in the incoming message, if they can't find the id they need, they create an object and append the returned id to the message.

The implementation feels a bit naive. Do you have any recommended patterns for such structures?

AlpBilgin commented 7 years ago

Hello @zubairov ,

I attempted to implement your explanations and the advice. Could you please check the latest state of the code?