Adding Rows to Data Extensions

Data Extensions in the Salesforce Marketing Cloud platform are simply database tables in which you can store data you need for your campaigns.

You can add rows to data extensions using:

With the API, you have a few options — SOAP being the most complex, AMPScript the simplest:

You can use AMPScript in emails, landing pages or SMS keyword configurations. I’ll use AMPScript in this example.

Here’s how you add or update a single row in a data extension named My_Test_DataExtension using the UpsertDE() function:

Here’s a breakdown of the UpsertDE() arguments in this example:

  1. The name of the data extension to receive the data
  2. Number of columns you’re using to check to see if there’s a matching row already in the data extension. (This means there will be only 1 pair of name and value arguments following this parameter. ¬†You could specify more.)
  3. The lookup column
  4. The lookup value
  5. Column 1 to update
  6. Column 1 update value
  7. Column 2 to update
  8. Column 2 update value

For further reading:
UpdateDE()
AMPScript Functions
UpsertData() (for SMS keywords)
UpdateData() (for SMS keywords)



Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz