Isikhungo Sokuthandelwa Kwe-Salesforce Marketing Cloud: I-AMPScript ne-Cloud Page Isibonelo

Ikhodi yekhasi lokuthandwayo le-AMPscript Salesforce-Integrated

Indaba eyiqiniso… umsebenzi wami uqale kahle eminyakeni engaphezu kweyishumi eyedlule lapho ngiqala isikhundla sokuba yi-Integration Consultant ye-ExactTarget (manje eyi-Salesforce Marketing Cloud). Umsebenzi wami ungithathe emhlabeni wonke ngisiza izinkampani ekwakheni ukuhlangana okujulile nepulatifomu futhi ngakha ulwazi oluningi lwesikhungo lwengxenyekazi ngaze ngakhushulelwa esikhundleni sokuba yi-Product Manager.

Izinselelo zeMenenja yoMkhiqizo wenhlangano eyayingumnikazi wonjiniyela ekugcineni zaholela ekutheni ngiqhubekele phambili. Kwakuyinhlangano enkulu, kepha angikaze ngeqiniso ophethe umkhiqizo. Ngakho-ke, ngenkathi ontanga yami besekela, ukuthengisa, nokumaketha komkhiqizo bebheke kimi ukuthi ngenze ushintsho lwangempela… iqiniso ukuthi iqembu lezentuthuko livame ukusebenzisa isisombululo esihlukile futhi ngithole izinsuku ngaphambi kokukhishwa.

Enye yamaphrojekthi wami wokugcina ibisebenza kungxenyekazi yangaphakathi yokubhala ezokwenza amakhasimende ethu akwazi ukufaka iskripthi kuma-imeyili awo. Ngisebenze nenye iMenenja yoMkhiqizo futhi senza ucwaningo oluningi… ekugcineni sithathe isinqumo sokwakha indlela yesitayela se-JQuery ngemisebenzi yethu, kepha kufaka phakathi ikhono lokudlula nokusebenzisa ukuhlelwa, ukusebenzisa i-JSON, njll. Isixazululo… size sifike ekuthuthukisweni. Ekuqaleni komjikelezo womkhiqizo, umtapo wezincwadi wami wasuswa futhi unjiniyela omkhulu wafaka esikhundleni sawo AMPscript.

Ngemuva kweminyaka, i Umlingani weSalesforce inkampani engisebenzisana nayo manje yenza ukuhlanganiswa okuyinkimbinkimbi, kwamabhizinisi, futhi ngizithola ngicwile ku-AMPscript nsuku zonke - kungaba ukukhulisa umqondo wokuqukethwe we-imeyili noma ukukhipha i-Cloud Pages. Vele, ukukhungatheka kokusebenza usuku nosuku nge-AMPscript kuyangiqinisekisa ukuthi isinqumo esingalungile senziwa emuva ngalezo zinsuku… isixazululo sami besizoba sihle kakhulu. Ngizizwa sengathi ngibuyile ekuhleleni i-TRS-80 ku-BASIC.

Isihleli osisebenzisela i-Cloud Pages asithetheleli. Akubambi izingqinamba ezilula njengokumemezela okuguquguqukayo noma amaphutha we-syntax ngekhodi yakho. Eqinisweni, ungashicilela ikhasi elizomane likhiqize iphutha leseva elingu-500. Kunemikhakha emibili yokuqamba amagama amakhasi akho… ungangibuzi ukuthi kungani.

I-pro-tip: Uma i-Cloud Pages ingabuyisi idatha yesampula lapho usuzoshicilela futhi kubukeka sengathi icubungulwa unomphela… uzolahla iphutha. Uma ushicilela noma kunjalo, kuzodingeka ukuthi ususe i-Cloud Page ngokuphelele bese uqala phansi. Ukuqagela kwami ​​ukuthi ingqalasizinda eyakhelwe kuyo ayihlakaniphile ngokwanele ukukhomba ushintsho lwekhodi futhi iqhubeka nokucubungula ikhodi efakwe kunqolobane.

Ngaphandle kwalokhu, uzokujabulela ukwazi amasampula ekhodi amaningi abhalwe phansi anamaphutha awo we-syntax. Yebo! Kuyisimo esesabekayo… kepha usengasisebenzisa futhi kufanele usisebenzise ngoba sinikeza ukuguquguquka okumangazayo.

Inothi eliphansi: Kunekhasi elisha lamafu Experience… Lapho kubukeka sengathi bavele bahlinza kabusha ikhasi futhi alinikezi imininingwane eyengeziwe. Empeleni ngiyithanda kangcono inguqulo yakudala yokulandelana kwezinyathelo eziningi.

Ngenkathi inkampani yami Highbridge yakha izixazululo eziyinkimbinkimbi, ezinikwe amandla i-Ajax ezihlanganisa izinhlelo eziningi nokufaka izandiso zedatha ne-AMPscript, i-SSJS, i-Cloud Pages, ne-imeyili… Bengifuna ukwaba isibonelo esilula sokuthi ungaqala kanjani ngokumane usebenzise i-AMPscript ukubuza isibonelo sakho se-Salesforce bese udonsa idatha emuva. Kulokhu, inkambu elula ye-boolean egcina ifulegi eliyinhloko elizikhipha ohlwini. Yebo, unganweba le khodi ukwakha lonke ikhasi lokuncamelayo noma isikhungo sephrofayela ongasisebenzisa.

Khiqiza isixhumanisi sekhasi lamafu ngedatha yombhalisi

Uma ubheka imininingwane yakho ye-Cloud Page, ungathola i-ID yekhasi elihlukile lekhasi ongalifaka kuma-imeyili akho.

i-id yekhasi lamafu

I-syntax imi kanje:

<a href="%%=RedirectTo(CloudPagesURL(361))=%%">View My Preferences</a>

I-AMPscript yedatha ye-Salesforce nge-Cloud Pages nge-Data Extensions

Isinyathelo sokuqala sokwakha i-AMPscript yakho ukumemezela okuguquguqukayo bese uthola idatha ku-Salesforce ozoyisebenzisa ekhasini lakho. Kulesi sibonelo, inkambu yami ye-Salesforce boolean ephethe iqiniso noma amanga ibizwa ngegama I-OptedOut:

%%[

/* Declare EVERY variable */
VAR @contactKey,@agent,@referrer,@unsub
VAR @rs,@updateRecord,@checked
 
/* Request your ContactKey from the querystring */
Set @contactKey = Iif(Empty([_subscriberKey]),RequestParameter("contactKey"),[_subscriberKey])

/* Set unsub to false unless it is passed in the querystring */
SET @unsub = Iif(Not Empty(RequestParameter('unsub')),RequestParameter('unsub'),'false')
 
/* If unsub, then update the Salesforce field OptedOut */ 
IF NOT Empty(@unsub) THEN
  SET @updateRecord = UpdateSingleSalesforceObject('contact',@contactKey,'OptedOut', @unsub)
ENDIF

/* Retrieve the Salesforce Contact record */
Set @rs = RetrieveSalesforceObjects('contact', 'FirstName,LastName,OptedOut', 'Id', '=', @contactKey);
 
/* Get the fields from the record */
 IF RowCount(@rs) == 1 then
  var @record, @firstName, @lastName, @optout
  set @record = Row(@rs, 1)
  set @firstName = Field(@record, "FirstName")
  set @lastName = Field(@record, "LastName")
  set @optout = Field(@record, "OptedOut")
ENDIF

/* Build a string for your checkbox to be checked or not
 set @checked = '';
 IF (@optout == 'true') THEN
  set @checked = 'checked'
 ENDIF
 
]%%

Manje usungakha i-HTML yakho nefomu elicubungula isicelo:

<!DOCTYPE html>
<html>
   <title>Profile Center</title>
   <body>
      <h2>Your Profile:</h2>
      %%[ if RowCount(@rs) == 1 then ]%%
      <ul>
         <li><strong>First Name:</strong> %%=v(@firstName)=%%</li>
         <li><strong>Last Name:</strong> %%=v(@lastName)=%%</li>
         <li><strong>Unsubcribed:</strong> %%=v(@optout)=%%</li>
      </ul>
      <form method="get">
       <div>
         <input type="hidden" id="contactKey" name="contactKey" value="%%=v(@contactKey)=%%">
         <input type="checkbox" id="unsub" name="masterUnsub" value="true" %%=v(@checked)=%%>
         <label for="masterUnsub">Unsubscribe From All</label>
        </div>
       <div>
         <button type="submit">Update</button>
        </div>
     </form>
      %%[ else ]%%
      <p>You don't have a record.</p>
      %%[ endif ]%%
   </body>
</html>

Yilokho kuphela… lihlanganise konke futhi unekhasi lokuncamelayo elibuyekezwa ngerekhodi lakho lobhalisile bese lidlulisa isicelo sokuvuselela inkambu ye-boolean (eyiqiniso / yamanga) eSalesforce. Manje usungakha imibuzo yangokwezifiso kuleyo nkambu ukuze uqinisekise ukuthi oxhumana nabo abakhethwe ngaphandle abathunyelwa noma iyiphi i-imeyili!

Ungalithuthukisa kanjani ikhasi lakho lokuncamelayo noma isikhungo sephrofayela

Vele, lokhu kumane kuyisihluthulelo salokho okungenzeka ngekhasi lokuthandayo. Izithuthukisi ongafisa ukucabanga ngazo:

  • Gcwalisa umbhalo uqobo kusuka kwesinye isandiso sedatha ukuze iqembu lakho lokumaketha libuyekeze okuqukethwe yikhasi noma nini lapho lingathanda ngaphandle kokuthinta ikhodi.
  • Gcwalisa isandiso sedatha yohlu lokushicilela futhi uqaqe okushicilelwe ukuze unikeze ukungena noma ukuphuma kokuncamelayo ngaphezu kokuzikhipha ohlwini okuyinhloko.
  • Gcwalisa isandiso sedatha ukuze uthwebule ukuthi kungani ababhalisile bakho bezikhipha ohlwini.
  • Gcwalisa eminye imininingwane yephrofayili kusuka kwirekhodi leSalesforce ukuze unikeze imininingwane eyengeziwe yephrofayili
  • Cubungula ikhasi nge-Ajax ukuze ukwazi ukuligcwalisa ngaphandle komthungo.
  • Nikeza indlela yokubhalisa ukuze umsebenzisi wakho akwazi ukufinyelela esikhungweni sephrofayili yakhe nganoma yisiphi isikhathi.

Izinsizakusebenza ezingeziwe ze-AMPscript

Uma ufuna usizo olwengeziwe lokufunda nokuthumela i-AMPscript, nazi izinsiza ezinhle kakhulu:

  • Umhlahlandlela we-AMPscriptI-e - ihlelwe ngabasebenzi beSalesforce, lesi isizinda semininingwane esiphelele se-AMPscript syntax, yize izibonelo zilula impela. Ukube bekunamandla amakhulu, bekungakufanelekela ukutshalwa kwemali.
  • I-Trailhead AMPscript - I-Trailhead's Salesforce iyinsiza yokufunda yamahhala futhi ingahamba ngezisekelo zolimi ngazo zombili i-AMPscript, i-SSJS, nokuthi bobabili bangaxhumana kanjani.
  • Ukushintshaniswa Kwesitaki seSalesforce - umphakathi omuhle online okucela usizo ngethoni lamasampuli ekhodi ye-AMPscript.

Kukhona ithani lamathuba ekuhlanganiseni i-Cloud Pages yakho ne-Salesforce ukuhlinzeka ngomuzwa ophakeme womsebenzisi. Futhi uma inkampani yakho idonsa kanzima, ungaxhumana nathi njalo ukusiza!

Contact Highbridge

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.