How to insert a record in Salesforce by using AMPscript?

How to insert a record in Salesforce by using AMPscript?

How to insert a record in Salesforce by using Ampscript

1- First you have to create a cloud page in 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

0 Comments

Leave a Reply

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?