-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
394 lines (356 loc) · 21.6 KB
/
index.html
File metadata and controls
394 lines (356 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"> <!-- Defines the character encoding for the document -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- For responsive design -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Ensures proper rendering in older versions of Internet Explorer -->
<!-- SEO meta tags -->
<meta name="description"
content="Unlock your potential in Salesforce Marketing Cloud with our insightful blogs, fostering continuous learning, confident expertise, and influential contributions">
<!-- Page description -->
<meta name="keywords" content="ampscript, ssjs, wsproxy, b2shashi,SFMC,sfmc, SEO">
<!-- Keywords for search engines -->
<meta name="author" content="Shashi Prasad"> <!-- Author of the page -->
<meta name="twitter:card" content="Unlock your potential in Salesforce Marketing Cloud with our insightful blogs, fostering continuous learning, confident expertise, and influential contributions">
<meta name="twitter:title" content="AMPSCRIPTIFY">
<meta name="twitter:description" content="Unlock your potential in Salesforce Marketing Cloud with our insightful blogs, fostering continuous learning, confident expertise, and influential contributions">
<meta name="twitter:image" content="https://raw.githubusercontent.com/b2Shashi-mc/ampscript/main/icon.png">
<!-- Social media meta tags (for better sharing on platforms like Facebook, Twitter) -->
<meta property="og:title" content="AMPscriptify"> <!-- Open Graph title (Facebook, LinkedIn) -->
<meta property="og:description"
content="Unlock your potential in Salesforce Marketing Cloud with our insightful blogs, fostering continuous learning, confident expertise, and influential contributions">
<!-- Open Graph description -->
<meta property="og:url" content="https://b2shashi.blogspot.com/"> <!-- Open Graph URL -->
<meta property="og:image" content="https://raw.githubusercontent.com/b2Shashi-mc/ampscript/main/icon.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="AMPSCRIPTIFY">
<meta name="robots" content="index, follow"> <!-- Tells search engines to index the page and follow links -->
<title>AMPscriptify</title>
<link rel="icon" href="icon.jpg" type="image/jpeg">
<link rel="stylesheet" href="ampscriptify.css">
<!-- Include CodeMirror styles -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.64.0/codemirror.min.css">
<!-- Include CodeMirror theme styles -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.64.0/theme/dracula.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.64.0/theme/eclipse.min.css">
<!-- You can include more themes as required -->
<!-- Include CodeMirror CSS for code editor styling -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<header class="page-header">
<div class="social-icons">
<a href="https://www.linkedin.com/in/sasee-prasad/" target="_blank" title="LinkedIn">
<i class="fab fa-linkedin"></i>
</a>
<a href="https://whatsapp.com/channel/0029VakJVlGFCCoP35ta060I" target="_blank" title="WhatsApp">
<i class="fab fa-whatsapp"></i>
</a>
<a href="https://www.youtube.com/@b2shashi" target="_blank" title="YouTube">
<i class="fab fa-youtube"></i>
</a>
<a href="https://medium.com/@b2.shashi" target="_blank" title="Medium">
<i class="fab fa-medium"></i>
</a>
<a href="mailto:admin@b2shashi.net" target="_blank" title="Gmail">
<i class="fab fa-google"></i>
</a>
<a href="https://twitter.com/b2Sasee" target="_blank" title="Twitter">
<i class="fab fa-twitter"></i>
</a>
<a href="https://b2shashi.blogspot.com/" target="_blank" title="Blog">
<i class="fas fa-blog"></i>
</a>
<a href="https://www.buymeacoffee.com/b2shashi" target="_blank" class="buy-me-a-coffee">
<img src="https://img.buymeacoffee.com/button-api/?username=b2shashi&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"
alt="Buy Me a Coffee" />
</a>
</div>
<h1>AMPSCRIPTIFY</h1>
<div class="right-buttons">
<button class="open-tab-btn" id="ws-proxy">WS-Proxy</button>
<button class="open-tab-btn" id="data-views">Data Views</button>
<button class="open-tab-btn" id="SSJS">SSJS</button>
<button class="open-tab-btn" id="ampscript">AMPscript</button>
</div>
<button class="theme-toggle" id="toggleThemeButton">Toggle Theme</button>
</header>
<nav class="left-navigation">
<h3>AMPSCRIPT Functions</h3>
<input type="text" id="chapterSearch" class="chapter-search" placeholder="Search Functions...">
<ul class="chapter-list">
<li><a class="nav-link active" data-chapter="chapter1">LOOKUP</a></li>
<li><a class="nav-link" data-chapter="chapter2">LOOKUPROWS</a></li>
<li><a class="nav-link" data-chapter="chapter3">LOOKUPROWSCS</a></li>
<li><a class="nav-link" data-chapter="chapter4">LOOKUPORDEREDROWS</a></li>
<li><a class="nav-link" data-chapter="chapter5">LOOKUPORDEREDROWSCS</a></li>
<li><a class="nav-link" data-chapter="chapter6">INSERTDATA</a></li>
<li><a class="nav-link" data-chapter="chapter7">INSERTDE</a></li>
<li><a class="nav-link" data-chapter="chapter8">UPDATEDATA</a></li>
<li><a class="nav-link" data-chapter="chapter9">UPDATEDE</a></li>
<li><a class="nav-link" data-chapter="chapter10">UPSERTDATA</a></li>
<li><a class="nav-link" data-chapter="chapter11">UPSERTDE</a></li>
<li><a class="nav-link" data-chapter="chapter12">DATEADD</a></li>
<li><a class="nav-link" data-chapter="chapter13">DATEDIFF</a></li>
<li><a class="nav-link" data-chapter="chapter14">FORMATDATE</a></li>
<li><a class="nav-link" data-chapter="chapter15">MATH</a></li>
<li><a class="nav-link" data-chapter="chapter16">CREATESALESFORCEOBJECT</a></li>
<li><a class="nav-link" data-chapter="chapter17">UPDATESALESFORCEOBJECT</a></li>
<li><a class="nav-link" data-chapter="chapter18">ATTRIBUTEVALUE</a></li>
<li><a class="nav-link" data-chapter="chapter19">BASE64DECODE</a></li>
<li><a class="nav-link" data-chapter="chapter20">BASE64ENCODE</a></li>
<li><a class="nav-link" data-chapter="chapter21">DOMAIN</a></li>
<li><a class="nav-link" data-chapter="chapter22">ISEMAILADDRESS</a></li>
<li><a class="nav-link" data-chapter="chapter23">ISNULL</a></li>
<li><a class="nav-link" data-chapter="chapter24">OUTPUT</a></li>
<li><a class="nav-link" data-chapter="chapter25">OUTPUTLINE</a></li>
<li><a class="nav-link" data-chapter="chapter26">RANDOM</a></li>
<li><a class="nav-link" data-chapter="chapter27">CONCAT</a></li>
<li><a class="nav-link" data-chapter="chapter28">INDEXOF</a></li>
<li><a class="nav-link" data-chapter="chapter29">LENGTH</a></li>
<li><a class="nav-link" data-chapter="chapter30">LOWERCASE</a></li>
<li><a class="nav-link" data-chapter="chapter31">PROPERCASE</a></li>
<li><a class="nav-link" data-chapter="chapter32">REGEXMATCH</a></li>
<li><a class="nav-link" data-chapter="chapter33">REPLACELIST</a></li>
<li><a class="nav-link" data-chapter="chapter34">REPLACE</a></li>
<li><a class="nav-link" data-chapter="chapter35">SUBSTRING</a></li>
<li><a class="nav-link" data-chapter="chapter36">TRIM</a></li>
<li><a class="nav-link" data-chapter="chapter37">UPPERCASE</a></li>
<li><a class="nav-link" data-chapter="chapter38">ATTACHFILE</a></li>
<li><a class="nav-link" data-chapter="chapter39">BARCODEURL</a></li>
<li><a class="nav-link" data-chapter="chapter40">BUILDOPTIONLIST</a></li>
<li><a class="nav-link" data-chapter="chapter41">BUILDROWSETFROMSTRING</a></li>
<li><a class="nav-link" data-chapter="chapter42">BUILDROWSETFROMXML</a></li>
<li><a class="nav-link" data-chapter="chapter43">BUILDROWSETFROMJSON</a></li>
<li><a class="nav-link" data-chapter="chapter44">CONTENTBLOCKBYID</a></li>
<li><a class="nav-link" data-chapter="chapter45">CONTENTBLOCKBYKEY</a></li>
<li><a class="nav-link" data-chapter="chapter46">CONTENTBLOCKBYNAME</a></li>
<li><a class="nav-link" data-chapter="chapter47">EXECUTEFILTER</a></li>
<li><a class="nav-link" data-chapter="chapter48">EXECUTEFILTERORDEREDROWS</a></li>
<li><a class="nav-link" data-chapter="chapter49">RAISEERROR</a></li>
<li><a class="nav-link" data-chapter="chapter50">FORMATCURRENCY</a></li>
<li><a class="nav-link" data-chapter="chapter51">RMM PERSONALIZATION</a></li>
<li><a class="nav-link" data-chapter="chapter52">EMAIL PERSONALIZATION</a></li>
<li><a class="nav-link" data-chapter="chapter53">LOGUNSUBEVENT</a></li>
<li><a class="nav-link" data-chapter="chapter54">UPDATE SUBSCRIBER</a></li>
<li><a class="nav-link" data-chapter="chapter55">UPDATE PHONE NUMBER</a></li>
<li><a class="nav-link" data-chapter="chapter56">ACCESS TOKEN</a></li>
<li><a class="nav-link" data-chapter="chapter57">FIRE JOURNEYAPIEVENT</a></li>
<li><a class="nav-link" data-chapter="chapter58">FIRE TRIGGEREDSENDEVENT</a></li>
<li><a class="nav-link" data-chapter="chapter59">RUN QUERYDEFINITION</a></li>
<li><a class="nav-link" data-chapter="chapter60">RUN AUTOMATION</a></li>
<li><a class="nav-link" data-chapter="chapter61">DUPLICATE SUBSCRIBERS</a></li>
<li><a class="nav-link" data-chapter="chapter62">BUSINESSUNIT SUBSCRIBERS</a></li>
</ul>
<div class="progress-indicator-container">
<div class="progress-indicator" id="progressIndicator"></div>
</div>
</nav>
<main class="content">
<!-- Chapter 1 with two rows -->
<section class="chapter">
<!-- Top Row: Table Generator -->
<div class="chapter-row">
<div class="table-panel">
<h3>Data Extension</h3>
<form id="columnForm">
<input type="number" id="numColumns" placeholder="Number of Attributes (minimum of 3)" min="1"
style="display: none;">
<button type="button" id="defineColumns" style="display: none;">Define Attributes</button>
</form>
<div id="columnContainer"></div>
<button id="generateTableButton" style="display: none;">Create Data Extension</button>
<div id="tableContainer"></div>
<div id="editButtonContainer">
</div>
</div>
</div>
<!-- Bottom Row: Code Editor -->
<div class="chapter-row">
<div class="code-panel">
<h3>AMPscript Code Editor:</h3>
<textarea id="codeEditor" name="code" rows="80" cols="50">
%%[
/*
Welcome to AMPSCRIPTIFY!
Get ready to generate dynamic and efficient AMPscript code in just a few steps.
Here's how to get started:
1. Specify the number of attributes you want to include (minimum: 3).
2. Click the "Define Attributes" button to proceed.
3. Provide details for each attribute, such as "SubscriberKey," "FirstName," "LastName," etc.
4. Click "Generate Table" to create a Data Extension tailored to your needs.
5. Use the left navigation menu to select the AMPscript function you'd like to generate.
6. Customize the Data Extension name and attributes to align with your specific use case.
7. Copy the generated AMPscript code and test it to ensure it meets your requirements.
Let's bring your ideas to life with AMPscriptify!
*/
]%%</textarea>
<!-- Refresh Button -->
<button id="refreshButton" class="refresh-btn icon-btn" onclick="refreshCode()">
<i class="fa fa-sync-alt"></i> <!-- FontAwesome refresh icon -->
</button>
<!-- Copy to Clipboard Button on the Right Side -->
<button id="copyButton" class="copy-btn icon-btn" onclick="copyCode()">
<i class="fa fa-clipboard"></i> <!-- FontAwesome clipboard icon -->
</button>
</div>
</div>
</section>
</main>
<div id="copyModal" class="copy-modal">
<div class="modal-content">
Code copied to clipboard!
</div>
</div>
<!-- Modal Popup for Column Instructions -->
<div class="popup-modal" id="popupModal">
<div class="popup-content">
<span class="close-btn" id="closeModal">×</span>
<h2>Instructions</h2>
<p>To proceed, please enter the number of attributes you'd like to define <strong> (minimum of 3)</strong>,
and then click on
the <strong>"Define Attributes"</strong> button.</p>
<button id="defineColumnsBtn">Define Attributes</button>
</div>
</div>
<!-- Modal for displaying messages -->
<div class="popup-modal" id="messageModal" role="dialog" aria-labelledby="messageModalLabel" aria-hidden="true">
<div class="popup-content">
<span class="close-btn" id="closeMessageModal" aria-label="Close message modal">×</span>
<h2 id="messageModalLabel">Instructions</h2>
<p id="popupMessageContent">This is a sample message.</p>
<button id="instructionsbtn">Close</button>
</div>
</div>
<div id="notebookPopup" class="notebook-popup">
<div class="book-container">
<!-- Left Page -->
<div class="book-page left-page">
<h2 class="page-title">
<i class="fas fa-book"></i> Welcome to AMPSCRIPTIFY!
</h2>
<p class="page-content">
<i class="fas fa-bullhorn"></i> It is my great pleasure to introduce you to
AMPSCRIPTIFY, a tool I have developed to empower SFMC users
like yourself. Whether you are a seasoned professional or just starting your journey with AMPscript,
this platform is designed to make your experience smoother and more efficient. My goal is to provide
a space where you can learn, test, and share AMPscript in a way that simplifies the complexities of
working.
</p>
<p class="page-content">
<i class="fas fa-cogs"></i> The latest version of AMPSCRIPTIFY offers dynamic
AMPscript generation, a powerful feature that streamlines your marketing workflows. With this tool,
you can now accelerate your campaigns with greater precision, enabling you to meet your goals with
efficiency and confidence.
</p>
<p class="page-content">
I sincerely hope that you find AMPSCRIPTIFY as
valuable a resource as I intended it to be.
</p>
<!-- Author Signature Section -->
<div class="author-signature">
<p> Warm regards, <br /><strong>Shashi Prasad</strong></p>
<!-- Social Media Links -->
<div class="social-media-links">
<a href="https://www.linkedin.com/in/sasee-prasad/" target="_blank" aria-label="LinkedIn">
<i class="fab fa-linkedin"></i>
</a>
<a href="https://www.youtube.com/@b2shashi" target="_blank" aria-label="YouTube">
<i class="fab fa-youtube"></i>
</a>
<a href="https://www.buymeacoffee.com/b2shashi" target="_blank" class="buy-me-a-coffee">
<img src="https://img.buymeacoffee.com/button-api/?username=b2shashi&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"
alt="Buy Me a Coffee" />
</a>
</div>
</div>
</div>
<!-- Book Spine -->
<div class="book-spine"></div>
<!-- Right Page -->
<div class="book-page right-page">
<h2 class="page-title">
<i class="fas fa-clipboard-list"></i> Step-by-Step Guide
</h2>
<p class="page-description">
<i class="fas fa-map-signs"></i> Follow these steps to create and refine AMPscript for your
Salesforce Marketing Cloud campaigns:
</p>
<!-- Steps Container -->
<div class="steps-container">
<ol class="step-list">
<li>
<div class="step-icon">
<i class="fas fa-check-circle"></i>
</div>
<div class="step-text">
<strong>Define Attributes:</strong> Choose at least 3 attributes for dynamic content.
This could include SubscriberKey, FirstName, etc.
</div>
</li>
<li>
<div class="step-icon">
<i class="fas fa-plus-circle"></i>
</div>
<div class="step-text">
<strong>Set Attributes:</strong> Enter details like SubscriberKey, FirstName, etc. to
personalize your message.
</div>
</li>
<li>
<div class="step-icon">
<i class="fas fa-table"></i>
</div>
<div class="step-text">
<strong>Generate Table:</strong> Create a Data Extension for your AMPscript, ensuring
you have the right data structure.
</div>
</li>
<li>
<div class="step-icon">
<i class="fas fa-code"></i>
</div>
<div class="step-text">
<strong>Customize AMPscript:</strong> Adjust the code as needed for your specific
campaigns. Personalization is key!
</div>
</li>
<li>
<div class="step-icon">
<i class="fas fa-laptop-code"></i>
</div>
<div class="step-text">
<strong>Test and Refine:</strong> Test and refine your AMPscript in Salesforce to ensure
everything is working perfectly.
</div>
</li>
<li>
<div class="step-icon">
<i class="fas fa-external-link-alt"></i>
</div>
<div class="step-text">
<strong>Visit for More Details:</strong> For a more in-depth guide and advanced
techniques, visit <a href="https://medium.com/@b2.shashi/406a6efb8ff0" target="_blank"
class="more-details-link">this page</a>.
</div>
</li>
</ol>
</div>
<!-- Close Button -->
<button id="closePopup" class="btn-close">
<span class="icon"><i class="fas fa-times"></i></span>
</button>
</div>
</div>
</div>
<!-- Footer Section -->
<footer class="footer">
<p>© 2024 Shashi Prasad. All Rights Reserved.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.3/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.3/mode/javascript/javascript.min.js"></script>
<script src="ampscriptify.js"></script>
</body>
</html>