Newer Version Available
InvokeSalesforceRestApiFunction Lambda Function
To learn more about programmatically managing Salesforce records, refer to the Object Reference for Salesforce and Lightning Platform and the Salesforce REST API Developer Guide.
Each action is defined by the “methodName” key in the input attributes. To see some examples of how this function is used, review the Sample Contact Flows that are in the REST API section.
| Action | methodName Value | Other Required Attributes |
|---|---|---|
| Create a Salesforce record | createRecord |
|
| Update an existing Salesforce record | updateRecord |
|
| Query for a Salesforce record | queryRecord |
soql containing the desired SOQL query.
For
example: |
| methodName | Output Attribute Name | Description |
|---|---|---|
| createRecord | recordId | ID of the newly created record. |
| updateRecord | None | N/A |
| queryRecord |
Names match the names of the fields you queried. |
A list of the selected fields. Each attribute contains a different field. Note that regardless of your query, only the first resulting record is returned. |
TIP: To check that the function returned information successfully, add a condition to a Check contact attributes block to check an output attribute based on some detail you expect to see in the result. For instance, let’s say you’re performing a query that returns a contact ID. A contact ID always contains “003” in the ID value, so you can use that information to check the success or failure of the call.

And then build your contact flow logic based on this result.
