What is the logic behind the Pipedrive integration?

What is the logic behind the Pipedrive integration?

Logic:
  1. Incoming calls: Myoperator will check if an open deal exists in the Pipedrive panel or not. If deal does not exist, we will create a new deal if deal exists, we add the call as activity.
  2. Outgoing Calls: Only activity will be saved against open deals.