Inserting parent and child records with Salesforce Synchronization

  • 20Views
  • Last Post 4 weeks ago
0
votes
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.

Thanks.

Order By: Standard | Newest | Votes
0
votes
Jacob Widmer posted this 4 weeks ago

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?

0
votes
Mariia Zaharova posted this 4 weeks ago

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:

https://skyvia.com/resources/docs/index.html?lookup_mapping.htm

Close