I am wondering what is the best way we can you push data into Data Extensions from an external Landing page. Would an API be able to handle this? Could AMPscript be used or not, because the page would be hosted externally.
Thanks!
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityAmpscript would not work on an external landing page. You can use the REST API to insert a record into a data extension. Sample code is mentioned below. Also refer to the REST API reference https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/routes.htm
Host: https://www.exacttargetapis.com
PUT /hub/v1/dataevents/key:{key}/rows/{primaryKeys}
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"values":{
"LastLogin":"2013-05-23T14:32:00Z",
"IsActive":true,
"FirstName":"John",
"FollowerCount":2,
"LastName":"Smith"
}
}