Back to All

3rd Party Integration

While this is for a specific 3rd party, these same steps can be used for other 3rd party integrations

Overview:

WonderLust is a service that is paid for by purchasing a SKU through the DirectScale order process. When this SKU is purchased for the first time, an account will be created with WonderLust through the WonderLust API and member information will be passed back. The WonderLust SKU will be attached to a serviceID that when purchased will automatically set up an autoship. When the service expires in DirectScale, the WonderLust Update API will need to be called to update the service to ‘suspended’. After the designated grace period in the CRM_ServiceItems table, the WonderLust Update API will need to be called to ‘terminate’.

WonderLust

CREATE ACCOUNT:

On FinalizeAcceptedOrder

  • Check to see if serviceID 1 is not active for Associate
  • Check Items to see if any of them attach to serviceID 2 (CRM_ServiceItems)
  • Check to see if CRM_CustomFields: Field 2 is blank
  • Post an event to the bus.

Custom API

  • This API will receive the event from the bus in order to call to WonderLust and create the user in their system and activate the account
  • After that user has been created it will receive the user ID from WonderLust
  • Update Associate Custom Fields with the responseID (CRM_CustomFields: Field 2)
  • Add a log to the SupportTicketService “Successfully created WonderLust Elite Personal account. Member ID:[Member ID returned from WonderLust]”

Note: We are using the event bus and a custom API because we need to listen for a response back from WonderLust and do not want to have the order process stop and wait for a response before completing the order.

UPDATE PERSONAL INFO:

WonderLust update to personal info

  • Associates.UpdateAssociate Hook
  • Check Associate CRM_CustomFields: Field 2
  • If they have an Member ID in Field 2, put an event on the bus for update associate.
  • Add a log to the SupportTicketService “Successfully updated account info in WonderLust Member ID: [Member ID in Custom Field 2]”

UPDATE SERVICE STATUS:

WonderLust update to reactivate service

  • On FinalizeAcceptedOrder
  • Check to see if serviceID 2 is not active for Associate
  • Check to see if CRM_CustomFields: Field 2 is NOT blank
  • Check Items to see if any of them attach to serviceID 2 (CRM_ServiceItems), put Event on bus
  • Update WonderLust status to ‘Activate’ according to API instructions
  • On success, add a log to the SupportTicketService “WonderLust services reactivated for Member ID: [Member ID in Custom Field 2]”

WonderLust update to suspend service

  • DailyRun Hook
  • Check Associate CRM_CustomFields: Field 2
  • Check Active Services that have expired for serviceID 2 (Note that we are not looking at the grace period for suspensions), put Event on bus
  • Update WonderLust status to ‘Suspended’ according to API instructions
  • On success, add a log to the SupportTicketService “WonderLust services suspended for Member ID: [Member ID in Custom Field 2]”

WonderLust update to terminate account

  • DailyRun Hook
  • Check Active Services that have expired for serviceID 2
  • Check Associate CRM_CustomFields: Field 2
  • Check the grace period designated in the CRM_ServiceItems table. On the expiration date + grace period, put Event on bus.
  • Update WonderLust status to Terminate according to API instructions
  • On success, add a log to the SupportTicketService “WonderLust services terminated for Member ID: [Member ID in Custom Field 2]”

Work to be done after development by the internal client team:

Reporting visibility

  • Who is currently subscribed to WonderLust
    
  • Successful orders processed with the WonderLust SKU (for accounting) by time
  • Who has/is currently suspended
  • Who has been terminated