Forlọ Ọrụ Na-ahọrọ Cloudgwé ojii Na-ere ahịa Salesforce: AMPScript na Cloud Page Ihe Nlereanya

AMPscript Salesforce-Integrated Marketing Cloudgwé ojii Mmasị Page Usoro

Ezi akụkọ… m ọrụ n'ezie kwụsịrị ihe karịrị afọ iri gara aga mgbe m malitere a ọnọdụ dị ka mwekota Ndụmọdụ maka ExactTarget (ugbu a Salesforce Marketing Cloud). Ọrụ m kpọọrọ m n'akụkụ ụwa niile na-enyere ụlọ ọrụ aka ịmepụta ihe dị omimi na ikpo okwu ma m wulitere ọtụtụ ihe ọmụma gbasara ikpo okwu nke mere ka m bulie Onye na-ere ahịa.

Ihe ịma aka nke Ngwaahịa Ngwaahịa maka nzukọ nke nweburu ndị nwe ya mechara duga m ịga n'ihu. Ọ bụ nnukwu nzukọ, mana emeghị m n'ezie nwere ngwaahịa. Ya mere, mgbe ndị ọgbọ m na nkwado, ahịa, na ngwaahịa ahịa anya m na-eme ka a ezigbo mgbanwe… nke bụ eziokwu bụ na mmepe otu mgbe emejuputa atumatu a dị iche iche ngwọta na m ga-achọpụta ụbọchị tupu ntọhapụ.

Otu n'ime ọrụ ikpeazụ m na-arụ ọrụ na ikpo okwu ederede nke ga-enyere ndị ahịa anyị aka ịgbakwunye edemede na ozi ịntanetị ha. Mụ na onye njikwa ngwaahịa ọzọ rụkọtara ma anyị mere ọtụtụ nyocha… mechara kpebie ịzụlite usoro JQuery na ọrụ nke anyị, mana gụnyere ikike ịgafe na iri nri, jiri JSON, wdg. Ọ ga-abụ ezigbo ngwọta… ruo mgbe ọ kụrụ development. Na mbido usoro ngwaahịa a, ekpochapụrụ ọbá akwụkwọ m ma mechie ya AMPcript.

Ọtụtụ afọ mgbe e mesịrị, Onye ahia ahia ụlọ ọrụ m bụ onye ọlụlụ na - eme ihe mgbagwoju anya ugbu a, achọpụtara m na AMPscript kwa ụbọchị - ma ọ bụ ịkwalite mgbagha ọdịnaya email ma ọ bụ na - ewepụta Cloud Cloud. N'ezie, obi nkoropụ nke ịrụ ọrụ kwa ụbọchị na AMPscript na-eme ka m jide n'aka na emere mkpebi na-ezighi ezi n'oge ahụ… ihe ngwọta m gaara abụworị nke mara mma. Ọ dị m ka m lọghachitere TRS-80 na BASIC.

Onye nchịkọta akụkọ ị na-eji maka Cloud Pages adịghị agbaghara. Ọ naghị ejide okwu ndị dị mfe dịka ikwupụta mgbanwe dị iche iche ma ọ bụ syntax njehie na koodu gị. N'ezie, ị nwere ike bipụta peeji nke ga - ewepụta njehie sava 500. Enwekwara aha abụọ maka ibe gị… ajụla m ihe kpatara ya.

Pro-n'ọnụ: If a Cloud Pages never Return sample data mgbe ị na-aga na-ebipụta na ya anya ka ọ na-nhazi ruo mgbe ebighị ebi… ị na-aga otutu njehie. Y’oburu n’ipiputa ya n’agbanyeghi, ig gha aghapu ihichapu igwe ojii kpamkpam ma bido. Echere m bụ na akụrụngwa nke ewuru ya enweghị ọgụgụ isi iji mata mgbanwe koodu ma na-emezi koodu ahụ echekwara.

Wezụga nke ahụ, ị ​​ga-a gladụrị ọ toụ ịmata ọtụtụ nke koodu ederede ederede nwere njehie syntax ha. Ee! Ọ bụ ahụmahụ jọgburu onwe ya… mana ị ka nwere ike iji ya n'ihi na ọ na-enye ụfọdụ mgbanwe dị ịtụnanya.

Akụkụ akụkụ: Enwere ihu igwe ojii ohuru ahụmahụEbe ọ dị ka ọ dị ka ha ga-enwetaghachi akpụkpọ ahụ ọzọ, ọ nweghị ozi ọzọ. M n'ezie na-amasị ochie version mma maka multi-nzọụkwụ ebipụta usoro.

Mgbe m ụlọ ọrụ Highbridge na-ewulite ihe dị mgbagwoju anya, Ajax nyeere aka nke jikọtara ọtụtụ sistemụ na ijikọ data agbakwunyere na AMPscript, SSJS, Cloud Pages, na email… Achọrọ m ịkekọrịta ihe atụ dị mfe etu ị ga - esi bido site na iji AMPscript jụọ ajụjụ Salesforce gị wee dọpụta. azụ data. N'okwu a, otu ubi boolean dị mfe nke na-echekwa nna ya ukwu ọpụpụ ọkọlọtọ. N'ezie, ị nwere ike ịgbatị koodu a iji wuo ibe mmasị ma ọ bụ ebe profaịlụ ị nwere ike iji.

N'ịwa njikọ igwe ojii na data ndị debanyere aha

Ọ bụrụ na ịlele nkọwa igwe ojii gị, ịnwere ike ịnweta NJ peeji nke pụrụ iche maka ibe ị nwere ike ịgụnye na ozi ịntanetị gị.

igwe ojii peeji nke id

The syntax bụ dị ka ndị:

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

AMPscript maka Data Salesforce site na Peeji ojii site na Mgbakwunye Data

Nzọụkwụ mbụ bụ iwu AMPscript gị iji kwupụta mgbanwe na weghachite data sitere na Salesforce iji mee na ibe gị. N'ihe atụ a, akpọrọ ubi ahịa Salesforce m na-ejide eziokwu ma ọ bụ ụgha Emeghe:

%%[

/* 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
 
]%%

Ugbu a ị nwere ike ịmepụta HTML gị wee mepụta usoro arịrịọ ahụ:

<!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>

Nke ahụ bụ ya… tinye ya niile na ị nwere mmasị na peeji nke na-emelite na gị subscriber ndekọ na gafere a arịrịọ ka imelite a boolean ubi (ezi / ụgha) na Salesforce. Ugbu a, ị nwere ike iwulite ajụjụ achọrọ na mpaghara ahụ iji hụ na kọntaktị na-apụ apụ anaghị ezipụ ozi email ọ bụla!

Etu ị ga - esi bulie Mmasị Peeji ma ọ bụ Ebe profaịlụ gị

N'ezie, nke a bụ ntakịrị ihe nwere ike iji peeji ọkacha mmasị. Mmezi nke ịchọrọ iche maka:

  • Jupụta ederede n'ezie site na ndọtị data ọzọ ka ndị ahịa gị nwee ike imelite ọdịnaya nke ibe ahụ oge ọ bụla ha masịrị na-enweghị imetụ koodu ahụ aka.
  • Mepee ndọtị ndepụta ndepụta nke mbipụta yana akaghị site na mbipụta iji nye ma ọ bụ nwepu aha na mmasị na mgbakwunye na nnabata wepu aha.
  • Mepee ihe kpatara mgbatị data weghara ihe kpatara ndị debanyere aha gị na-nwepu ndebanye aha.
  • Mepụta ozi profaịlụ ndị ọzọ sitere na ndekọ Salesforce iji nye ozi profaịlụ ndị ọzọ.
  • Hazie Ajax ka ibea nwee ike mejuputa ya.
  • Nyefee ndebanye aha ka onye ọrụ gị nwee ike ịnweta ebe profaịlụ onwe ha n'oge ọ bụla.

Ihe ndi ozo maka AMPscript

Ọ bụrụ n ’ịchọrọ enyemaka ọzọ maka ịmụ na iwesa AMPscript, lee nnukwu akụ dịnụ:

  • AMPscript Nduzie - nke ụfọdụ ndị ọrụ Salesforce haziri, nke a bụ ezigbo nchekwa data zuru oke nke syntax AMPscript, ọ bụ ezie na ihe atụ ndị ahụ bụ ezigbo ọkụ. Ọ bụrụ na ọ siri ike karị, ọ nwere ike ịba ego ahụ.
  • AMPcript Trailhead - Salesforce's Trailhead bụ ihe mmụta mmụta na - akwụghị ụgwọ ma nwee ike ịgagharị gị site na ntọala nke asụsụ ahụ na AMPscript, SSJS, yana otu ha abụọ ga - esi mekọrịta
  • Tojupụtara Exchange maka Salesforce - nnukwu obodo dị na ntanetị maka ịrịọ enyemaka na ụda nke ụdị koodu AMPscript.

Enwere otutu ohere iji jikọta ibe igwe ojii gị na Salesforce iji nye ahụmịhe onye ọrụ ka elu. Ma ọ bụrụ na ụlọ ọrụ gị na-agba mgba, ị nwere ike ịkpọtụrụ anyị mgbe niile iji nyere aka!

Kpọtụrụ Highbridge

Kedu ihe ị chere?

Ebe a na-eji Akismet iji belata spam. Mụta otu esi etinye usoro data gị.