2

I currently have an app (node.js) running in Heroku, using Heroku Connect to connect to Salesforce to read/write data.

Heroku Connect essentially has a copy of selected data from Salesforce, which is pulled in via the Streaming API.

My application instantly writes to the HC PostgreSQL database, which instantly writes up to Salesforce.

This adds a unique reference field that is also instantly generated in Salesforce, however there is delay in this information being fed back to Heroku Connect.

I'm not sure if the delay is because of the streaming API or Heroku Connect, but I'm not sure how to minimise/remove this delay so that Heroku Connect instantly updates with the newly generated field.

Please take a look at the diagram below showing what is instant and where the delay is happening:

Diagram

4

My application instantly writes to the HC PostgreSQL database, which instantly writes up to Salesforce.

This is a common misconception. Heroku Connect is not a real time sync service, but rather an eventually consistent service. The behavior you're describing is what we expect from Connect.

You'll need to wait for the sfid to be synced down. While you wait, you can make use of the configured external id, which should be something like a uuid field and automatically generated both on the Salesforce and Postgres side. Properly configured, the external id allows you to update the record in Postgres before the record is updated with an sfid. It also allows you to query for and display the record in this period.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.