How to submit salesforce data to salesforce account using web forms

Vote:
 

Hi,

I am using salesforce add on for integrate the salesforce with our site. After configured the salesforce add on, I can to create a data submission form for salesforce. Then I can render this using MVC and I can post the values to salesforce account successfully. 

In MVC, I am using the following code,

XFormPageUnknownActionHandler _xformHandler = new XFormPageUnknownActionHandler();

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult DoSubmit(XFormPostedData xFormpostedData)
{
    return _xformHandler.HandleAction(this);
}

But I want to do the same functionality with web forms, in which I don't know with how to post the data to salesforce and that should be generic for all kinds for salesforce data like accout, contacts, leads...ect. 

Please suggest me how resovle this issue and let me know if you have any code snippet for this.

Thanks in advance.

Thanks,

#150473
Jun 20, 2016 12:24
Vote:
 

Latest EPiServer forms provide a webhook, Is that something can work for you?
Regards
/K

#150479
Jun 20, 2016 13:55
Vote:
 

Thanks for your reply, I am not sure about that webhook, I am looking for code which sutialbe for all kinds of data submission for salesforce irrespective of sepific URLs. Because, end client can create the forms by their own and wants post the data to salesforce.  

Can you share some code sample here?? Then we wil see how it is working and which is suitable for my functionality or not.

Thanks

#150486
Jun 20, 2016 14:46
Vote:
 

Hi Sam.

If you are considering to do a custom Salesforce implementation, then I would definately recommend you to use the new Episerver Forms instead of the older XForms feature. It's simply way more intuitive to work with from both an Author and Developer point of view. As K Khan mentions, it supports webhooks that assists you with the data integration.

I also feel it is important to mention that Episerver provides a product called Episerver Connect for Marketing Automation. It provides you with a shelf-product that actually has a Salesforce integration. We've used this add-on previously with success on client projects.

http://world.episerver.com/add-ons/connect-for-marketing-automation/

Hope it helped you with deciding how to approach your implementation.

Casper Aagaard Rasmussen

#150488
Jun 20, 2016 15:26
Vote:
 

You can use our Marketing Automation Integration addon 

or use Episerver Forms, you can use the builtin WebHookActor to send submissionData to any 3rd party URL (it will post to your URL).

You also can implement your own business, kind of simple thing with this demo https://github.com/episerver/EPiServer.Forms.Demo/blob/master/Implementation/Actors/InvisibleActor.cs

#150697
Jun 28, 2016 6:54
Vote:
 

Hey,

I would like to pass forms to Saleforce without using the SalesForce add on.

I understand I can pass the form results to a url (SalesForce), but can I give the different form fields the "ID" that I want. Episerver chooses a random value and it will not be possible to map to SalesForce if the ID is not correct

Here is how it looks:

 <input name="__field_7184" id="fa35d62b-2e3f-489a-8ce1-6892b4d9dd4a" type="text"  required data-f-datainput />

Here is what I want:

 <input name="__field_7184" id="first_name" type="text"  required data-f-datainput />

#193805
Jun 05, 2018 13:34
Vote:
 

Hi Scott, 

Nothing prevents you from modifying the submission before sending to your endpoint.

ID is not part of the formfield in submission. Web uses Name as formfield name.

In WebhookActor, we use the same technique (see line 1) to send friendlyname of form field, instead of __field_7184, something like this

var passedData = _formDataRepository.Service.TransformSubmissionDataWithFriendlyName(SubmissionData.Data, SubmissionFriendlyNameInfos, true);
var jsonData = (_formConfig.Service.SerializingObjectUsingNameValueFormat) ? passedData.ToJsonObject() : passedData.ToJson();
var dataBytes = Encoding.UTF8.GetBytes(jsonData);
request.ContentLength = dataBytes.Length;
using (var stream = request.GetRequestStream())
{
stream.Write(dataBytes, 0, dataBytes.Length);
}



#193853
Jun 06, 2018 8:43
Vote:
 

Hey,

Thanks for your help. Do I ned any sort of Security token. Or can I just do this

  1. Just create a form with the fields I want
  2. Add a hidden field <input type=hidden name="oid" value="OurOID Value">
  3. Create a Web hook going to  https://test.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8  (in this case our test enviroment)

Do I need any Security token and if I do, how do I implement that. We are only going to have basic text fields to start with: first_name, last_name, email, company, message

I see a lot of people are using Zapier to do what I want to do and I am assuming it is because it isn't as easy as I am describing above. I did open a free Zapier account to see what it was and saw I did need a security token if I was to use their services

#194018
Jun 11, 2018 14:27
Vote:
 

When you write your own Actor (as samples in Forms.Samples and Forms.Demo), you have full control of what is sent, because you write the code to send it.

You can add Security token if the remote endpoint (your saleforce endpoint) require it.

I don't know about Saleforce endpoint and its security mechanism. But in general, any database like that would require authentication and a token along with your web request. You have to read Saleforce documentation.

I believe that what Saleforce connector

#194042
Jun 12, 2018 6:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.