I have a Salesforce site which is used as a rest resource for a Shopify Webhook for new Order Creation. When a new order is created in Shopify it hits the Url provided by us and expects a "200 OK" in response. How can I return the required response to the webhook. Here is the document which depicts the webhook requirement:- https://help.shopify.com/en/api/getting-started/webhooks#configuring-webhooks (Please review the "Responding to a webhook" section). Below mentioned is the code Snippet :-
@RestResource(urlMapping='/ShopSf/Odr')
global class ShopifyRestClass {
@HttpPost
global static String setName(){
System.debug('>>>>>>in rest resource');
RestResponse response = RestContext.response;
response.statusCode = 200;
System.debug('>>>>>>>>>>>>>response'+response);
ShopifyDataSync.ShopifySyncMethod(RestContext.request,'Order');
return null;
}