Oct 19, 2024
103 Views
Comments Off on How to insert a record in Salesforce by using AMPscript?
0 0

How to insert a record in Salesforce by using AMPscript?

Written by

How to insert a record in Salesforce by using AMPscript

1- First you have to create a cloud page in the Marketing Cloud

2- Use the of Ampscript code –

To insert a record in Salesforce

%%[var @createSfRecordset @createSfRecord = CreateSalesforceObject( 'Lead', 4, 'FirstName', 'rajan', 'LastName', 'gupta', 'Email', 'test2gmail.com', 'Company','xyz')]%%

NOTE– You must remember your marketing cloud org and your Salesforce Org are perfectly integrated.

In this AMPscript we have inserted a lead record in Salesforce –

Lastname : gupta

Firstname : rajan

Email: test2gmail.com

Company: xyz

NOTE – You must remember that you have to use API name fields of Salesforce objects when you are inserting the record by using Ampscript.

To create a cloud page ——>

1- Login in marketing cloud —–> Click on cloud pages —–> Click on collections
2- Create a new collection —>
3- Create a new landing page —> Choose classic editor –> Write your Ampscript code —>
4- When your page is loaded then your record is inserted in Salesforce

Article Categories:
Salesforce
Priya Singh
https://thestarbiznews.com/

Expertise: Technology Trends, Startups, Digital Disruption Bio: Priya Singh is a tech-savvy millennial with a finger on the pulse of the ever-evolving digital landscape. A graduate of Stanford's Computer Science program and a former engineer at a Silicon Valley giant, Priya has a deep understanding of the technologies shaping our future. Her passion lies in demystifying complex tech jargon and exploring the disruptive potential of emerging trends, making her articles essential reading for anyone who wants to stay ahead of the curve. When not scouring the web for the latest tech tidbits, Priya enjoys traveling to off-the-beaten-path destinations and immersing herself in diverse cultures, always seeking new inspiration and insights.