AppFlow Salesforce: how to sync up relationships

AppFlow Salesforce: how to sync up relationships
Reading Time: < 1 minute

Using AppFlow, you can easily move data between Salesforce and other cloud-based systems such as Microsoft Dynamics, Oracle, or SAP. With AppFlow, you can automate the movement of data between these systems, which in turn means you can save time and energy.

One object at a time

At the time of writing this post, it’s not possible to sync up relationships from Salesforce to AppFlow. Only basic types such as strings or numbers can be passed through AppFlow which means that look-up fields will be ignored. There’s a way you can do it with some work from using the Salesforce out-of-the-box Process Builder or Flows tool, a custom object and some lines of Apex code.

The trick

We will need these three things to send out our related fields through AppFlow

  • A custom object
  • An Apex class
  • Process Builder

The custom object

This custom object will hold all three attributes to be synchronized. It will be our DTO(Data Transfer Object)

The Apex class

It will gather all the information we need and instantiate our DTO. Once inserted, Change Data Capture will take over the control to send our data to AppFlow

The flow built using Process Builder or Flows

It will call our Apex class under the conditions we want. It can be a “just execute every time I save an Account ” or with more complex rules

, ,

About the author

Andrés Canavesi
Andrés Canavesi

Software Engineer with 15+ experience in software development, specialized in Salesforce, Java and Node.js.

Join 22 other subscribers

Leave a Reply