Sending Realtime Records To Salesforce

This guide will walk you through how to send records to Valence using the Salesforce APIs, which will allow you to send record events into Salesforce as they happen.

To do real-time behavior in Valence we use a Push Link, which is a flavor of Link that expects records to be pushed from the source system (as opposed to querying for them at scheduled intervals).

Push Links are surfaced using the Salesforce Apex REST API. As an external system you would authenticate with Salesforce and then send messages to an Apex REST endpoint.


Salesforce offers a variety of ways to authenticate to its REST API. There is no special authentication for Valence; just authenticate to the Salesforce stack using standard mechanisms, which will also allow you to access the Valence endpoint.



Unless you are using a pre-existing application it is likely you will need to set up a Connected App in Salesforce. Instructions for that are part of the link above.

Sending The Message

Once authenticated, sending records to Valence is straightforward. Each Push Link has a unique endpoint URL that can be used to send records to that particular Link. You can find that URL in the top left corner of the Link dashboard:


The base URL is given to you when you authenticate with Salesforce. One of the parameters returned during authentication is your “instance url”, which will look something like this:

So in this case, my full URL for the Link would be:

To submit records, send an HTTPS POST to this endpoint (and don’t forget to include your authentication information in the header!).

The body of your post will be passed to the Link’s Source Adapter for processing. The expected shape of that body is specific to each source Adapter and how it was coded. As a best practice we recommend a JSON body format that looks something like this:

Possible Message Shape

        "Name" : "First Record",
        "Favorite Color" : "Blue"
        "Name" : "Second Record",
        "Favorite Color" : "You Get the idea..."