colorstackorg/oyster

Shopify API Integration - Gift Cards ๐ŸŽ

Closed this issue ยท 13 comments

Description

When new members join ColorStack, they go through an "activation" process where if they complete a set of required steps, they will be able to claim a swag pack. Unfortunately, SwagUp, our swag pack provider, does not support sending certain items in our swag pack internationally (including Puerto Rico).

Obviously, we still want to reward these members for completing their activation process. What we've historically done is issue them a $50 gift card to our merch store, which is about the same value as our swag pack. The issue is that the process for issuing this gift card has been a bit tedious.

We want to implement an integration with Shopify (which powers our merch store), so that issuing a gift card is extremely easy to do within our Admin Dashboard. Luckily, Shopify has a Gift Card API that should make this process easy.

Acceptance Criteria

This issue should do the following:

  • Implement the ability to create a gift card, using the Shopify API (ie: POST /gift_cards.json).
    • Note: I haven't dug into the API documentation too much yet, but we might have to create a Shopify "customer" first (ie: POST /customers.json) and use that customer ID in the gift card endpoint.
    • I would like to avoid introducing any new SDKs (ie: Shopify) to avoid potential bloating. Let's just use the native fetch API to build this integration.
  • In the Admin Dashboard -> Students page, add an option when clicking on the row's option to "Send Gift Card". This should open a modal which contains a form asking for the "Amount".
  • Upon submitting the form above, this should send the gift card to the member. This should also send an internal Slack notification.

Don't worry about testing this - just implement 90% and I'll jump in to help testing with a real Shopify API key.

Additional Context

  • Here is the dropdown that controls the options available for a row in the students table in the Admin Dashboard.

I would love to work on this!

Would love to work on this!

Edit: oops I didn't see Joyeleke's comment๐Ÿ˜…

@sajjad-source All good. You could work on this if you really want to!

There's actually another very similar integration that we need to build with Goody, which is what we use to administer DoorDash gift cards after Fam Fridays.

So @Joyeleke you can work on this Shopify integration, and then @sajjad-source when I put up the Goody issue, you can work on that!

Hey @ramiAbdou been running into a couple problems while trying to work on this over the weekend. I can't test out the functionality of gift cards using admin api (unless I get a Plus Account which requires all kinds of business verification). Do you have any ideas?

  • From Support:
Screenshot 2024-05-06 at 2 13 15โ€ฏPM

Ohh just read the description again! Looks like you want me to create the backbone and forget about testing for now right?

hi, i would love to help on this issue if help is still needed

@Joyeleke yeah don't worry about testing for now - just try to get as far as you can without testing and I'll jump in with you to drive it home!

@ramiAbdou Just wanted to say I paused on this for a while because I am on a little personal break. Should be able to work on this and hopefully have something by next week though!

I really appreciate the heads up! There's no rush on this ticket so no pressure at all!

Hey @Joyeleke, lmk if you're still working on this issue or if we can open this issue up for someone else!

Going to open up this issue!

A couple weeks ago, we learned that our swag pack provider, SwagUp, now supports shipping to Canada and Puerto Rico! That being said, the use case for sending Shopify gift cards is a lot less relevant given that we only generated them for members that were unable to claim swag packs. Closing this issue!