For Zoho Services only:


I'm actually part of something bigger at Ascent Business Solutions recognized as the top Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions offer support for smaller technical fixes and projects for larger developments, such as migrating to a ZohoCRM.  A team rather than a one-man-band is always available to ensure seamless progress and address any concerns. You'll find our competitive support rates with flexible, no-expiration bundles at https://ascentbusiness.co.uk/zoho-services/uk-zoho-support.  For larger projects, talk to our experts and receive dedicated support from our hands-on project consultants at https://ascentbusiness.co.uk/zoho-services/zoho-crm-implementation.

The team I manage specializes in coding API integrations between Zoho and third-party finance/commerce suites such as Xero, Shopify, WooCommerce, and eBay; to name but a few.  Our passion lies in creating innovative solutions where others have fallen short as well as working with new businesses, new sectors, and new ideas.  Our success is measured by the growth and ROI we deliver for clients, such as transforming a garden shed hobby into a 250k monthly turnover operation or generating a +60% return in just three days after launch through online payments and a streamlined e-commerce solution, replacing a paper-based system.

If you're looking for a partner who can help you drive growth and success, we'd love to work with you.  You can reach out to us on 0121 392 8140 (UK) or info@ascentbusiness.co.uk.  You can also visit our website at https://ascentbusiness.co.uk.
ZohoDeluge: eBay marketplace account deletion/closure notifications

ZohoDeluge: eBay marketplace account deletion/closure notifications

What?
eBay allows users to request the deletion of their personal data from eBay's own systems, as well as from the systems of all partners who store or display that data, including third-party developers integrated with eBay APIs through the eBay Developers Program.

To help third-party developers comply with these requests, eBay has implemented a push notification system. This system alerts all eBay Developers Program applications when a user has requested the deletion of their personal data and closure of their eBay account. This article explains the process third-party developers must follow to subscribe to, receive, respond to, and validate these notifications.

Why?
As quoted from the page: https://developer.ebay.com/marketplace-account-deletion

"Existing Developers: The August 31, 2021 deadline for existing developers to subscribe to or opt out of eBay marketplace account deletion/closure notifications has passed. Failure to comply with this requirement will result in termination of your access to the Developer Tools, and/or reduced access to all or some APIs.

New Developers: All new third-party developers coming to the platform must subscribe to or opt out of eBay marketplace account deletion/closure notifications before they make their first API call. Once the new developer's application is subscribed to eBay marketplace account deletion/closure notifications or they have successfully opted out of the notifications, the keyset/App ID is activated, and they can begin making API calls.
"

How?
Let's cover the first preamble points here:
  1. While completing the form, the developer subscribes to eBay marketplace account deletion/closure notifications by saving an endpoint URL and verification token, eBay sends a unique challenge code via a GET request (e.g., GET https://?challenge_code=123). The provided endpoint URL must use the 'https' protocol and cannot include internal IP addresses or 'localhost'.
  2. Upon receiving the unique challenge code, the endpoint must hash the challengeCode, verificationToken, and endpoint URL (in that exact order), and respond to eBay with an HTTP 200 OK status, including the hashed result in JSON format within the challengeResponse field. The response's Content-Type header must be set to application/json.
The following instructions are on the eBay page but this is the TLDR version:
  1. Sign into your developer account: https://developer.ebay.com/signin.
  2. Navigate to the Application Keys page: https://developer.ebay.com/my/keys
  3. Click the Notifications link next to your App ID to open the Alerts and Notifications page: https://developer.ebay.com/my/push
  4. Select the Marketplace Account Deletion option in the Event Notification Delivery Method section.
  5. Enter a required email address to receive alerts if your Notification Endpoint URL becomes unreachable, then click Save.
  6. Enter your Notification Endpoint URL, which must use 'https' and be accessible to you, and ensure it can respond to eBay's validation challenge code.
  7. In the Verification token field, enter a unique 32–80 character token containing only letters, numbers, underscores (_), or hyphens (-), which eBay uses to verify ownership of your endpoint.
  8. After entering your Notification Endpoint URL and Verification token, click Save, triggering eBay’s validation process, which requires your endpoint to successfully reply to eBay's challenge code.
So I created a function within ZohoCRM to return the challenge and made it into a REST API function with a zapikey. I entered the URL ZohoCRM gives me as the endpoint for the eBay challenge. Here's my function in full as a webhook:
copyraw
string standalone.fn_eBay_AlertNotification(String crmAPIRequest)
{
/* *******************************************************************************
Function:       string standalone.fn_eBay_AlertNotification(String crmAPIRequest)
Trigger:        Function executed when a webhook from eBay is sent to ZohoCRM (Market Deletion Webhook)
Purpose:		eBay Marketplace Account Deletion/Closure Notifications Workflow
Inputs:         String crmAPIRequest (Webhook)
Outputs:        JSON String crmAPIResponse

Date Created:   2025-03-13 (Joel Lipman)
                - Initial release
Date Modified:  2025-03-13 (Joel Lipman)
                - Validated Webhook
				- Send email to client
				
More Info:
				https://developer.ebay.com/marketplace-account-deletion
				
				metadata.topic						topic of the notification
				metadata.schemaVersion				schema version
				metadata.deprecated					boolean to indicate deprecation
				notification.notificationId			unique identifier of the notification
				notification.eventDate				timestamp indicating when eBay user made the data deletion request
				notification.publishDate			timestamp indicating when current notification was sent
				notification.publishAttemptCount	integer indicating how many times the notification has been sent to this specific callback URL
				notification.data.username			this string is the publicly known eBay user ID
				notification.data.userId			this string is the immutable identifier of the eBay user
				notification.data.eiasToken			this string is the eBay user's EIAS token; another identifier used for an eBay user
				
	******************************************************************************* */
	m_Payload = crmAPIRequest.toMap();
	m_Params = ifnull(m_Payload.get("params"),Map());
	//
	v_ChallengeCode = m_Params.get("challenge_code");
	v_VerificationToken = "<verification_token_entered_on_the_form>";
	v_Endpoint = "https://www.zohoapis.com/crm/v7/functions/fn_ebay_alertnotification/actions/execute?auth_type=apikey&zapikey=<my_zapikey>";
	v_Response = zoho.encryption.SHA256(v_ChallengeCode + v_VerificationToken + v_Endpoint);
	//
	m_Challenge = Map();
	m_Challenge.put("challengeResponse",v_Response);
	//
	try
	{
		//
		m_MetaData = m_Params.get("metadata");
		v_Topic = ifnull(m_MetaData.get("topic"),"-");
		v_SchemaVersion = ifnull(m_MetaData.get("schemaVersion"),"-");
		v_Deprecated = ifnull(m_MetaData.get("deprecated"),"-");

		m_Notification = m_Params.get("notification");
		v_NotificationID = ifnull(m_Notification.get("notificationId"),"-");
		v_EventDate = ifnull(m_Notification.get("eventDate"),"-");
		v_PublishDate = ifnull(m_Notification.get("publishDate"),"-");
		v_PublishAttemptCount = ifnull(m_Notification.get("publishAttemptCount"),"-");
		m_Notification_Data = ifnull(m_Notification.get("data"),"-");
		v_Username = ifnull(m_Notification_Data.get("username"),"-");
		v_UserID = ifnull(m_Notification_Data.get("userId"),"-");
		v_EiasToken = ifnull(m_Notification_Data.get("eiasToken"),"-");
		//
		v_DebugMessage = crmAPIRequest + "<hr />" + m_Params + "<hr />" + v_ChallengeCode + "<hr />" + v_VerificationToken + "<hr />" + v_Endpoint + "<hr />" + v_Response;
		//
		v_Message = "<table style='border:1px'>";
		v_Message = v_Message + "<tr><th>username</th><th>userId</th><th>eiasToken</th>";
		v_Message = v_Message + "<tr><td>"+v_Username+"</td><td>"+v_UserID+"</td><th>"+v_EiasToken+"</td>";
		v_Message = v_Message + "</table>";
		//
		v_StatusCode = 200;
		//
		v_To = "<my_developer_ebay_email>";
		l_bcc = List({<another_developer_ebay_email>});
		//
		sendmail
		[
			from :zoho.loginuserid
			to :v_To
			bcc: l_bcc
			subject :v_Topic
			message :v_Message
		]
	}
	catch(e)
	{
		v_StatusCode = 403;
	}
	//
	m_PayloadResponse = Map();
	m_PayloadResponse.put("body",m_Challenge);
	m_PayloadResponse.put("status_code",v_StatusCode);
	m_WebhookResponse = Map();
	m_WebhookResponse.put("crmAPIResponse", m_PayloadResponse);
	//
	return m_WebhookResponse;
}
  1.  string standalone.fn_eBay_AlertNotification(String crmAPIRequest) 
  2.  { 
  3.  /* ******************************************************************************* 
  4.  Function:       string standalone.fn_eBay_AlertNotification(String crmAPIRequest) 
  5.  Trigger:        Function executed when a webhook from eBay is sent to ZohoCRM (Market Deletion Webhook) 
  6.  Purpose:        eBay Marketplace Account Deletion/Closure Notifications Workflow 
  7.  Inputs:         String crmAPIRequest (Webhook) 
  8.  Outputs:        JSON String crmAPIResponse 
  9.   
  10.  Date Created:   2025-03-13 (Joel Lipman) 
  11.                  - Initial release 
  12.  Date Modified:  2025-03-13 (Joel Lipman) 
  13.                  - Validated Webhook 
  14.                  - Send email to client 
  15.   
  16.  More Info: 
  17.                  https://developer.ebay.com/marketplace-account-deletion 
  18.   
  19.                  metadata.topic                        topic of the notification 
  20.                  metadata.schemaVersion                schema version 
  21.                  metadata.deprecated                    boolean to indicate deprecation 
  22.                  notification.notificationId            unique identifier of the notification 
  23.                  notification.eventDate                timestamp indicating when eBay user made the data deletion request 
  24.                  notification.publishDate            timestamp indicating when current notification was sent 
  25.                  notification.publishAttemptCount    integer indicating how many times the notification has been sent to this specific callback URL 
  26.                  notification.data.username            this string is the publicly known eBay user ID 
  27.                  notification.data.userId            this string is the immutable identifier of the eBay user 
  28.                  notification.data.eiasToken            this string is the eBay user's EIAS token; another identifier used for an eBay user 
  29.   
  30.      ******************************************************************************* */ 
  31.      m_Payload = crmAPIRequest.toMap()
  32.      m_Params = ifnull(m_Payload.get("params"),Map())
  33.      // 
  34.      v_ChallengeCode = m_Params.get("challenge_code")
  35.      v_VerificationToken = "<verification_token_entered_on_the_form>"
  36.      v_Endpoint = "https://www.zohoapis.com/crm/v7/functions/fn_ebay_alertnotification/actions/execute?auth_type=apikey&zapikey=<my_zapikey>"
  37.      v_Response = zoho.encryption.SHA256(v_ChallengeCode + v_VerificationToken + v_Endpoint)
  38.      // 
  39.      m_Challenge = Map()
  40.      m_Challenge.put("challengeResponse",v_Response)
  41.      // 
  42.      try 
  43.      { 
  44.          // 
  45.          m_MetaData = m_Params.get("metadata")
  46.          v_Topic = ifnull(m_MetaData.get("topic"),"-")
  47.          v_SchemaVersion = ifnull(m_MetaData.get("schemaVersion"),"-")
  48.          v_Deprecated = ifnull(m_MetaData.get("deprecated"),"-")
  49.   
  50.          m_Notification = m_Params.get("notification")
  51.          v_NotificationID = ifnull(m_Notification.get("notificationId"),"-")
  52.          v_EventDate = ifnull(m_Notification.get("eventDate"),"-")
  53.          v_PublishDate = ifnull(m_Notification.get("publishDate"),"-")
  54.          v_PublishAttemptCount = ifnull(m_Notification.get("publishAttemptCount"),"-")
  55.          m_Notification_Data = ifnull(m_Notification.get("data"),"-")
  56.          v_Username = ifnull(m_Notification_Data.get("username"),"-")
  57.          v_UserID = ifnull(m_Notification_Data.get("userId"),"-")
  58.          v_EiasToken = ifnull(m_Notification_Data.get("eiasToken"),"-")
  59.          // 
  60.          v_DebugMessage = crmAPIRequest + "<hr />" + m_Params + "<hr />" + v_ChallengeCode + "<hr />" + v_VerificationToken + "<hr />" + v_Endpoint + "<hr />" + v_Response; 
  61.          // 
  62.          v_Message = "<table style='border:1px'>"
  63.          v_Message = v_Message + "<tr><th>username</th><th>userId</th><th>eiasToken</th>"
  64.          v_Message = v_Message + "<tr><td>"+v_Username+"</td><td>"+v_UserID+"</td><th>"+v_EiasToken+"</td>"
  65.          v_Message = v_Message + "</table>"
  66.          // 
  67.          v_StatusCode = 200
  68.          // 
  69.          v_To = "<my_developer_ebay_email>"
  70.          l_bcc = List({<another_developer_ebay_email>})
  71.          // 
  72.          sendmail 
  73.          [ 
  74.              from :zoho.loginuserid 
  75.              to :v_To 
  76.              bcc: l_bcc 
  77.              subject :v_Topic 
  78.              message :v_Message 
  79.          ] 
  80.      } 
  81.      catch(e) 
  82.      { 
  83.          v_StatusCode = 403
  84.      } 
  85.      // 
  86.      m_PayloadResponse = Map()
  87.      m_PayloadResponse.put("body",m_Challenge)
  88.      m_PayloadResponse.put("status_code",v_StatusCode)
  89.      m_WebhookResponse = Map()
  90.      m_WebhookResponse.put("crmAPIResponse", m_PayloadResponse)
  91.      // 
  92.      return m_WebhookResponse; 
  93.  } 
Category: Zoho :: Article: 900

Add comment

Your rating:

Submit

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Please publish modules in offcanvas position.