- Set up the Data Destination
- Data Source
- Data Destination
Completely customize what happens in Salesforce each time a form submission is made. The Salesforce Apex Destination sends custom JSON documents of form submissions to your Salesforce endpoint, allowing you to create, for example, a parent record and child record with the same form submission. This means that you can fully control what happens with the JSON in Salesforce using an Apex script. Combine with other Salesforce data destinations to perform other actions (like creating a case) with the data from a single form submission. This uses the Salesforce Connection.
Apex is a development platform for building software as a service (SaaS) applications on top of Salesforce.com's customer relationship management functionality. Apex allows developers to access Salesforce.com's back-end database and client-server interfaces to create third-party SaaS applications. Apex includes an application program interface (API) that developers can use to access user data on Salesforce.com.
Note: As this destination requires the Apex API and configuration within the Salesforce account, ProntoForms Support cannot help you troubleshoot issues with Salesforce. ProntoForms currently supports Salesforce API version 24 for this data destination.
Set up the data destination, selecting Salesforce Apex REST Data Destination as the type.
- Name the destination.
- Select "auto-link" to link any forms you create in the future.
- Manually link existing forms to the destination.
- Optionally set up filter rules. The data destination will only create/update a record when these conditions are met.
- Connect the destination to Salesforce. Use an existing connection, or set up a new Salesforce Connection.
4. HTTP Method and Headers
ProntoForms supports both POST and PUT HTTP methods. Select which option to use based on the destination's settings.
POST: POST uses data from a submitted form to create an object in an external system.
PUT: PUT uses data from a submitted form to create or update an existing object in an external system.
An object may be as simple as a line of data in a database.
5. Apex REST Endpoint
Enter the appropriate endpoint URL. Configuring the endpoint URL is detailed in Salesforce's documentation: Creating REST APIs using Apex REST.
The default prefix is /services/apexrest/ but ProntoForms allows for a custom URL Prefix at need. Essentially, this will allow you to target more locations in the Data Destination. A custom URL might look something like this:
6. Destination Response Output
Destination response outputs allow users to make sequential requests to other systems, typically to create parent-child relationships in the data or objects you are creating in those systems. For example, a user might want to create an object in a first destination, and have destination response outputs pass the ID for that object to the next destination to add an appropriate attachment to it.
Click here for more information: Destination Response Output