REWARDS
Automated product rewards over...
Bypass Shopify for product fulfillment
5 min
in certain unique cases, some shopify brands cannot have their ambassador product rewards redeemed through shopify for context, when an ambassador redeems a product reward, their order is sent directly to shopify for fulfillment for brands that cannot have these orders being sent to their shopify store, they can request to disable having these orders sent to shopify and optionally handle this guide will walk you through the process of bypassing order creation in shopify and configuring webhooks to receive reward redemption notifications video walkthrough video transcript this is a transcript from the loom video walkthrough \[00 00] hey, this is jeff at roster in this video, i'm going to talk to shopify brands who are using roster's automated product reward feature to gift ambassadors with products \[00 13] this would be for completing campaigns or unlocking milestones and in this particular case, the brand doesn't want these orders to get \[00 24] created in the shopify store, which is the default experience so in the default flow, if an ambassador goes in, they, they, they earn a reward product reward, and they go through the process of picking what products they want and hitting submit, uh, by default, it creates that order in the brand shopify \[00 42] store, but there are some instances where brands don't want ambassador reward it's created in their shopify store for various reasons \[00 51] for example, we have a brand who's working with netsuite and it's important that the orders for their ambassadors are filled, fulfilled through netsuite directly and not through shopify \[01 02] so we have kind of a two part solution the first part is that as a brand using, who's connected with shopify, you can make a request to our customer support to disable orders from being created through shopify, um, when, when an ambassador redeems a reward that will just block the order from getting \[01 26] sent up to shopify and then as a part two, you can use rosters webhooks to be notified when an ambassador redeems a product reward \[01 36] and roster will send all the details of that product reward, including the ambassador's name, mailing address, email address, and the line items that they purchased \[01 49] and then you can do whatever you want with that and so in this video, i'm going to show you how you would set up the webhook side of things and how you could then be then use an integration like zapier that roster integrates with to receive that webhook and then send that order information \[02 12] and using zapier, you can literally send that anywhere you could put the order into a new row in a google spreadsheet, for example, if you wanted to handle it through spreadsheets \[02 21] uh, we have a case where a brand simplifies and literally just wants to get an email with that information in it \[02 27] so, we're going to show you how to do that in this, uh, video and then as a last step, if, because the order's not getting created in shopify directly, we do have the option of letting you, uh, call the order update endpoint to pass in the order id that has ended up getting created \[02 50] and if you would like to also pass in, if there's a url where the customer can click to view the status of the order, you can pass in that order status url \[02 59] and that would then show up for the ambassador when they click to view the details of that reward that they've already redeemed \[03 06] so, i'll walk through each step along the way uhm, it is a little bit more technical, so i'm kind of assuming that you have, uh, somewhat of a technical background if you're watching this \[03 15] and again, this is just one way you could do it, but there could be other ways, especially if you involve something like zapier \[03 21] so, okay so, the first thing i want to show you is what the reward looks like so, i'm going to click on the rewards tab right here in the left hand navigation \[03 32] and you can see here that i have an automated product reward so, i'm just going to click edit here and this brings up the reward builder, and you can see some of the details about it \[03 43] so, i've connected it to two different product groups there's a group where they can select from one of two products up to a $200 value \[03 54] and then there is a collection group where they can choose one of the 10 products of this collection so, that's what the reward looks like itself \[04 02] uhm, okay, so then what we'd want to do is use, look into roster's api so, i'm going to come over to our api documentation, and i'm going to scroll down to the very bottom under the events category for webhooks \[04 18] and within webhooks, you can see the different topics that we provide, and this first one, this one right here, reward slash redeem, is the topic that you would want to create a webhook for with your api key \[04 31] and if you come down to the webhook payload, you can click on this and here's a, uhm, basically like a preview of what the webhook payload would look like \[04 40] so, let me just kind of walk you through this webhook payload really quickly so, it does have an event id that you can then look up through the events endpoint \[04 48] the main data here is that it was a reward and there's an order object in this case, it does show an order id \[04 57] oh, excuse me the order id will always be there that's the roster internal order id, which you might use later on \[05 02] but then it does have the external order id and order number and that's because i actually pushed this through shopify to start with before i turned off the feature that blocks the orders from being sent out \[05 12] so i'm it to shopify but otherwise, if you have that disabled, then by default, these order ids will be, uh, blank \[05 20] and then you can see information about the ambassador, first name, last name, and email address and then in the, um, additional attributes of this payload, there are the line items that were ordered \[05 35] and then there are a line item in this case, and then the shipping information, which is exactly what you need to, um, mail the, uh, package \[05 48] so, okay so that's what that looks like but you, you, what you want to do is create a new webhook \[05 53] so you'd go to the create new webhooks, and it just takes two inputs the first input is the url that roster will send to the, uh, post request to, and then the second required field is the topic itself \[06 08] so i have, um, postman open here just to show you an example of what that looks like and you can see here, i've put in the webhook address for a zapier zap that i've created \[06 20] and then and the topic is reward slash redeemed so that's what what it would look like generating a webhook and i should also just point out if you're going to be doing this, you'll need to authenticate, make an authenticated call inside of your roster account \[06 39] you'll have in the, if you click the left hand navigation, the brand name or logo on the left navigation, and then in the fly out menu, click integrations \[06 47] and then when that mode will pop up click on api integration and you'll see that you have, uh, you may or may not have them, but you will need a private access token \[06 57] if you don't have a private access token already, you can come up to the new access token dropdown, select it, and choose to create a new private access token \[07 07] and then you would take that value and use it in the api based on how the api docs look say you should create an authenticated request using a private access token \[07 17] okay, so we have, uhm, so we have the webhook, or we know how we need to create a webhook, uhm, and then we want to receive that webhook when somebody redeems a reward and we want that to do something \[07 32] so i'm going to show you what a simple zap would look like using zapier so i've already created this zap and there's just two, uhm, there's a trigger and an action \[07 42] and the trigger is that it's going to catch a webhook so i have used zapier's built in catch hook and when i created this, it gave me the url to send the webhook to \[07 57] and now that it's already created i can find it here in the test tab so i would simply just copy whatever url they give me and then, however i'm making the request to create a new zap, i would paste that in to that, uhm, api call and then i would hit submit and then it would be ready to go \[08 17] and then, uhm, what i, what, what you'll then want to do, because zapier will actually just sit and wait for the first time for something to somebody to call that endpoint, what you would want to do is you would need to go into your roster account and set up a product reward and then fulfill that reward \[08 35] and that could be really simple, you could just come in and create a, a campaign or a milestone that's just internal and invite a few test users, i just created a test \[08 49] a campaign right here, this is actually a demo account, so it's a little bit easier for me, but i just created a campaign and then i added a product reward to it right here \[09 00] and then i added some people to the campaign and i came in as that person and i completed the campaign which is right here and as soon as i click completed the campaign, i was able to redeem that product reward \[09 17] and it was a really simple process, but by redeeming the product reward, it then triggered roster to send a webhook to the zapier endpoint and it resulted in having this record right here \[09 31] so, this is zapier's display of a nested json object that it got from that webhook, and it's all the same data that we showed you in the api docs when we looked at the sample payload for the reward redeemed topic \[09 50] so, all this data will then become available to you inside of any, uh, any zapier blocks downstream from this so then to in order to get an email to be sent to me, i used the gmail app in zapier \[10 08] you could use anything else you want though like i mentioned, this could be a google spreadsheet, uhm, could be directly sending this order information to a third party ordering system as long as they have an app on here, you can do it \[10 21] so, i selected gmail, i configured that, and dead and then i set up who i want it to send to, and then i put the subject that i want to use, the uhm, the ambassador's name in the subject, and then in the body, i just basically listed out all of the properties, and then i pasted it, i mean i used the \[10 42] tokens that you can get from right here to grab all of the data from the webhook payload itself and it was really, really straightforward, and then i hit continue, and i published that zap \[10 56] and as soon as it was published, then i ran another test, and redeemed a product reward from roster, and got the email, and here's what my zap email looks like \[11 07] so here's the order, and this, richard is the ambassador, and then here's all the information that came through on that \[11 13] on the zapier zap, and then the product line items just come through as a comma separated list of, of skus or line items from shopify, and then the quantity is also, uhm, brought in like that, this is just how zapier interpreted it, if you needed to have that information pulled in in a different way, \[11 33] what you could do is probably add in a new, uhm, you a new block here, and zapier has a bunch of steps to do, like, formatting, so you could put in a formatter here, and choose to go loop through the data that came through as part of this webhook and format it however you want, uhm, that might provide \[11 56] you with the formatting that you need that's different from how they pull in that uh, array from the json payload \[12 05] so, but it's pretty straightforward okay, so once that, uh, once you get that zap, you can do whatever you want with that \[12 14] from the ambassador's perspective that's going to show up as redeemed, so it really is up to you guys to make sure that that gets redeemed in a timely manner \[12 22] uhm, they'll see that either inside of the like this, or they'll all, they'll see all of their rewards if they come to the rewards tab and then click on the redeemed tab, they'll see that, uhm, for an automated product reward, there will typically be a see details and when they open that up, they'll \[12 40] see the description and if, if a order status url has been provided for the order, there will be a view order details link here, which opens up in a new tab \[12 50] so let me show you if you are not sending orders to shopify, then that will not be displayed by default because, uhm, we typically get that order status url directly from the shopify order \[13 04] but since the shopify order isn't being created, there isn't a url to display so what you can do is let's come actually to postman and take a look at what that, uhm, what that payload looks like \[13 19] so, uhm, you would have gotten a read post from that payload, but if you miss the post from the payload or from the webhook, there's a, uhm, there's the ability to view all the events \[13 36] so if we come to the events, right here, you can view all events, and events are basically all of the webhooks that get triggered for your brand, so you can come back and pull this after the fact \[13 47] but here's an event id, there were two products that were ordered, here's the shipping information so this is basically the information that you would need from the, uhm, from the, uhm, order that was placed, and what you can do is, for every web, for every event, excuse me, there's a subject, a subject \[14 12] type, and a subject id, so in this case the subject type is reward, that's what was redeemed, and this is the subject id, so you could grab that id, and then you can go get the, i think i already have this open, yeah, so we have an endpoint to get a specific reward, so we can paste that reward id in \[14 33] there, ah, that's not the right thing, but that's the right id, and it will give you all the details for that specific reward that was created, it will tell you that it came from this campaign, the ambassador it was for, and then down here you can see the order that it was placed \[14 50] and here's the internal order id for the roster order that got created and i can go to the order section of my api \[15 04] where's orders? oh, it's already open and i can retrieve a single order, and i can paste that in and get the details of that order \[15 14] and then if i would like, i can pass in a, uhm, order status url right here, which is that property right there \[15 25] and i can also update the fulfillment status so, if i come to this endpoint, update an order here's the payload right here \[15 34] and i'm going to pass in my order id and then this is where i can pass in the external order id so that the team inside of, uhm, so let's say, let's just change this to 1, 2, 3, 4, 5, 6, 7, uhm, let's say that that's the external order id that was created wherever i created this order, let's say in \[15 53] netsuite and i update the status and i give if the confirmation order has that same order id in it and i think these are required fields, so just keep these set from whatever was in the original order when you click to view the order, and then you could hit send \[16 14] and it will update the order in roster with this information so, let's see, let's see here uhm, this is the url \[16 26] url then that would be displayed to a customer when they want to check the status of their order from within the ambassador portal \[16 32] and i need to see why it's actually not updating to that it's maintaining the shopify order i think it's just because i have, still have this connected to shopify, but if i i believe that would then give the ambassador the, uhm, this order, this order, status url that i deliberately passed in \[16 53] so, okay covered a lot of steps here, but just in summary, brands can prevent orders from being created in their shopify store when ambassadors redeem product rewards \[17 06] and then, uh, as a companion to that, or just in addition to creating shopify orders, brands can also subscribe to webhooks for when orders are redeemed by ambassadors \[17 18] and they can do useful things with that information like send an email or put that data into a spreadsheet for another team member to use or whatever they would like using our webhooks feature \[17 29] um, and after the fact, you can look up those webhooks through our events, uh, endpoints and if you'd like to further augment the orders that were created through the, by the ambassadors for product rewards, you can update it with external order ids and external, i mean, the, uh, order status url to \[17 50] allow them to check the status of their orders so hopefully this is helpful if you have any questions while you're trying to set this up, let us know \[17 57] i know it's a fairly complicated topic, but i think for most developers, this would actually be a pretty simple approach \[18 02] so let us know how it goes in the meantime, have a great day thanks step by step instructions request order creation to be disabled in shopify contact roster customer support request to disable order creation through shopify for ambassador product rewards create a webhook in roster if you don't have experience making an api call, email support\@getroster com and we can create the webhook for you refer to roster's api docs within the webhooks section, review the reward/redeemed webhook topic and sample json payload in roster, obtain a private access token by clicking on the brand logo located at the bottom left of the window click on integrations > api integration copy an existing private access token or create a new one use your access token to create a new webhook (see api docs ) the webhook requires two inputs a url (e g , for a zapier integration) and the topic reward/redeemed use zapier to process the webhook data create a zap in zapier with a trigger to catch a webhook when creating your zap, zapier will provide a specific url to catch webhook data in your roster api call, use this url when creating the webhook test your zap with a sample reward redemption to ensure it captures the correct data define an action in zapier you can send the data to google sheets, gmail, or any other service supported by zapier configure your action to process and use json attributes from the webhook payload optional update order information in roster use the roster api to update the order status and external order id fetch order details using reward ids from the webhook events use the update order endpoint to pass in the external order id and order status url provide an order status url for ambassadors to view their order status in the ambassador portal ensure that fields like order id and external order id are properly set need help? if you need any additional assistance with with your roster account, feel free to contact our support team at support\@getroster com mailto\ support\@getroster com we're here to help!