Skip to content

Instantly share code, notes, and snippets.

View reap-admin's full-sized avatar

Swym Corporation reap-admin

View GitHub Profile
@reap-admin
reap-admin / gist:cfc299020e1dfacd78c1a3b073f5232d
Created January 31, 2018 03:12
Swym JS API code snippet for Top Wishlisted Items API
<script id="swym-top-widget-js">
window.SwymCallbacks = window.SwymCallbacks || [];
window.SwymCallbacks.push(function(swat){
var opts = {
params: {'type': 'top-wishlist', n: 10, days: 30}, // n - number, days - number of days
scb: function(response) {
var products = response.productmetadata;
// product schema here
/*
{
@reap-admin
reap-admin / swym_template_mutli_product.html
Created April 13, 2019 03:25
Swym Triggered Email Template for multiple products
<style>
@media only screen and (max-width:480px){
table[class=devicewidth] {width:290px!important;text-align:center!important;margin:15px auto!important;}
td[class=devicebreak] {width:290px!important;text-align:center!important;margin:auto!important;display:block!important;}
}
</style>
<table class="devicewidth" align="center" cellpadding="10">
<tbody>
<tr>
<td class="devicebreak">
@reap-admin
reap-admin / gist:0c9125cdf4d27cd8e3d01d5e0d471cc0
Created April 30, 2019 00:46
Event metadata for Klaviyo Flow
{
"event":"addedtowishlist",
"customer_properties":{
"$email":"demo@swym.it"
},
"properties":{
"$value":740.0,
"ProductName":"3/4 Sleeve Kimono Dress",
"Quantity":1,
"ProductURL":"https://demo.swym.it/collections/antoni-alison/products/3-4-sleeve-kimono-dress-coral",
@reap-admin
reap-admin / swym_cordial_back_in_stock_template
Created August 7, 2019 21:09
Swym Back In Stock template for Cordial
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!-- NAME: 1 COLUMN -->
<!--[if gte mso 15]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
@reap-admin
reap-admin / gist:202eb0d9766c8401b23180e69a511edd
Last active August 8, 2019 12:53
Swym Back-in-Stock Merge Tags
List of product attributes exposed via Swym Merge Tags
{
"ProductMasterId": 552454225967,
"ProductId": 7086502182959,
"Title": "Apple< Watch",
"desc": "Apple Watch - dndnndescription change - hedged - ss hdhdgdbdnnnnn - jknh - jjjj - jjjjkdkd - ss",
"iqty": 10,
"Price": 0.75,
"NoVariantKey1": false,
@reap-admin
reap-admin / coming_soon_template.html
Created May 7, 2020 20:48
Email template for Coming Soon alerts
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1504.84">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Times; color: #000000; -webkit-text-stroke: #000000}
@reap-admin
reap-admin / watchlist_eventschema.txt
Last active June 10, 2020 18:55
Swym Event Metadata - Add to Watchlist
{
"event":"addedtowatchlist",
"customer_properties":{
"$email":"demo@swym.it"
},
"properties":{
"$value":740.0,
"ProductName":"3/4 Sleeve Kimono Dress",
"ProductURL":"https://demo.swym.it/collections/antoni-alison/products/3-4-sleeve-kimono-dress-coral",
"ImageURL":"//cdn.shopify.com/s/files/1/1751/1833/products/2015-03-20_Ashley_Look_20_23515_15565_1024x1024.jpg?v=1485853414",
@reap-admin
reap-admin / webhook-remindme
Created December 8, 2020 17:59
Webhook remindme schema
{
"Event": "Swym-remindMe",
"EventTime": "2020-11-11T01:38:12Z",
"Medium": "email",
"MediumValue": "supritha.papanna@swymcorp.com",
"ProductId": 5742461321365,
"ProductName": "Mackie CR",
"ProductPrice": 1078,
"ProductQuantity": 20,
"ProductBrand": "Captain-Sound",
@reap-admin
reap-admin / klaviyo-authemail
Last active December 18, 2020 10:05
Klaviyo authemail schema
{
"eventname":"Swym-authEmail",
"customer_properties":{
"$email":"supritha.papanna@swymcorp.com"
},
"event":{
"EventTime":"2020-12-16T18:30:40Z",
"Device":"Mac",
"FirstName":"Sup",
"LastName":"P",
@reap-admin
reap-admin / klaviyo-sharewishlist
Last active December 18, 2020 10:05
Klaviyo sharewishlist schema
{
"eventname":"Swym-shareWishlist",
"customer_properties":{
"$email":"supritha.papanna@swymcorp.com"
},
"event":{
"EventTime":"2020-10-30T07:42:48Z",
"ListName":"My Wishlist",
"Note":"Cool hearings...Check out",
"SenderEmail":"supritha.papanna@swymcorp.com",