S4S Cloud provides functionality to take data from HTML forms, but also allows sending submissions directly. This is useful for sending any data to Salesforce that does not directly use a form, or where the form is too complex for automatic processing.
Code Block |
---|
let formData = { firstName: 'John', lastName: 'Smith', email: 'johnsmith@example.com', }; S4SCloud.forms.send('UNIQUE_FORM_ID', formData) .then((data) => { // Successful response. }) .catch((error) => { // Failed :-( }); |
...