Inserting parent and child records with Salesforce Synchronization

  • 109Views
  • Last Post 21 November 2018
Jacob Widmer posted this 16 November 2018

Hello there.

I am working with a Salesforce instance synchronizing with a Postgres database.

I am looking to insert an Opportunity record, and then immediately after insert an Attachment record with it's ParentId being that of the new Opportunity record. This will link my two records. 

It seems like I cannot do this because the Opportunity record does not have the Salesforce given "Id" synchronized back to my database until the synchronize job runs with Skyvia, and that can only be set to run at a minimum of every 2 minutes. I don't immediately have the SFDC Id when I am inserting my Attachment record.

Any recommendations or advice on how to implement this with Skyvia? This problem is not unique with these two record types, as any parent + child inserts will have this same issue.


Order By: Standard | Newest | Votes
Jacob Widmer posted this 19 November 2018

If you had a "post synchronization callout hook" of sorts, that would post out and hit a configured endpoint after a synchronization completes, that would solve my problem. But I don't think you have that, correct?

Mariia Zaharova posted this 21 November 2018

If you had a "post synchronization callout hook" of sorts,

Yes, we do not have callout hooks.


Most likely, the use of Lookup mapping in the second package (Attachments) will help you. Lookup will allow to get the ID of the necessary record directly from the Opportunity object (Salesforce) by some other field that uniquely identifies a record. To use the Lookup mapping, you need to have a column (or a set of columns) that uniquely identifies a record, other than the primary key/Id. 

For more information about lookup mapping, please refer to: