Batch/bulk coupon generation through API?
trevorcooper
Registered Users Posts: 2 Beginner grinner
I've already created an Illustrator template/xml data file to add unique coupon codes to the template using Illustrator data drive graphics so I can print coupons with the generated codes. Is there a method in the API to generate the coupons in my SM Pro account?
Thanks,
Trevor Cooper
trevorcooper.smugmug.com
Thanks,
Trevor Cooper
trevorcooper.smugmug.com
0
Comments
There isn't any coupons methods currently, but I've just finished implementing them, so they will most likely go with the next release.
Cheers,
David
SmugMug API Developer
My Photos
SmugMug API Developer
My Photos
Hey Stretch,
We don't have a bulk method for coupon creation per se, but it should be easy enough to make single requests to smugmug.coupons.create.
Let me know if you hav any questions.
Cheers,
David
SmugMug API Developer
My Photos
Trevor, now that the feature has been added, wondering if you know if anyone's taken advantage of it to create a bulk coupon generator. I've looked in the tools section, but haven't found anything. Want to drop coupons in with my print packages for athletics team photos, but it's been one-by-one and I've worn out fast.
The flow is essentially done by creating a spreadsheet with columns for each of various fields one can complete on a coupon page, then writing a text concatenation formula in Excel to build that out into a long URL in the same row of the spreadsheet, just in another column, of course. I use random.org's string generation service to create random codes (with some care to help customers differentiate between zeros and letter "O", etc.).
The URL also includes a hashtag and session ID that gets inserted within a minute or so of running the script so that I'm still within a login window at smugmug, required if you want smugmug to believe you are who you claim to be. I used the "rest" protocol since it was easier to build into a string, or seemed to be.
And then I wrote an AppleScript script to feed the URLs to Safari line by line -- the act of asking the browser to open that URL causes smugmug to create the coupon.
I used a couple of utilities to test things out.
XML-RPC_Client lets you build your parameters and displays in detail what you're getting back so you can see error codes and verify results. It was important not to botch these, since you can't delete coupons from smugmug. The testing helped.
The last step was for me to print coupons to physically include in portraits packages or sports team orders or to give as premiums when I'm pre-selling other products (books and DVDs) at an event and want to drive people to my photos as well. There are a couple of sites that offer credit-card sized die-cut 8.5x11" sheets that will feed into a laser printer. One is BlanksUSA's club cards, which are plain paper, and the other are RealCard's plasticized 3-up and 8-up cards. Lots of options to print on the card, around the card, on a placard next to the card, etc. By using Excel for the coupon generation, it simplifies mail merging and thus the printing of coupons.
If there is community interest in my writing up a detailed tutorial with sample files, let me know.
Comments and constructive criticism always welcome.
www.mikejulianaphotography.com
Facebook
Is there any way to script so we can mass generate coupons quickly and easily?
Before moving to smugmug, we used to simply used to be able to mass generate 2,000+ coupons in a matter of seconds (see attachement). Can this be done via the API? If so do you know or recommend someone who we can commission to build this capability via an app or custom script?
Best Regards,
SW
G'day Kevin,
Because coupons have potentially been used in orders we don't allow their removal. You can disable them by setting the 'Enabled' parameter to false.
Cheers,
David
SmugMug API Developer
My Photos