Membership Lifecycle Actions & Salesforce Sync

When a membership is purchased in ACME, the Workato integration creates an Opportunity for the Order associated with the purchase. The order contents will depend on the lifecycle action.


TABLE OF CONTENTS


New or Rejoin/After Term Renewal

When the ACME order contains a new membership purchase or a Rejoin/After Term Renewal, there is one line item on the ACME Order for the membership purchase:

The Opportunity created in Salesforce then also only contains one line item (Opportunity Product) for the membership version that was created. An ACME Membership record is created in SF for this membership purchase and is linked to that Opportunity:


If you click into the Opportunity Product above, you will see that it links to the ACME Membership Record:

If you click into the ACME Membership Record above, then you will see it links to the Opportunity:



Upgrade, Downgrade, Standard Renew, and Upgrade Renew

When the ACME order contains a lifecycle action that results in ‘replacing’ an existing membership version and creating a new one (i.e. due to an Upgrade, Downgrade, or Renewals set to start immediately, on transaction date) then there are 2 line items on the ACME order. 

  • One for the new membership version that was created (in this example it’s the Upgrade).

  • One for the prior membership version that was replaced. In this Upgrade example, the item has a negative balance as its value was applied to the purchase of the Upgrade.



The Opportunity created in SF then also contains 2 line items (Opportunity Products): 

  • One for the membership version that was created (in this example it’s the Upgrade).

  • One for the membership version that was replaced.


It is important that both items are Opportunity Products associated with the Opportunity so that the dynamic calculations for the Amount are accurate, particularly in the case of Upgrades and Downgrades where the original purchase amount is applied to the Upgrade/Downgrade.




Opportunity Product Links

  • If you click into the Opportunity Product above for the Upgrade, you’ll see that it links to the Membership version that was created in this Opportunity

  • If you click into the Opportunity Product above for the Replacement, you’ll see that it links to the PRIOR membership version


Only one ACME Membership Record (the one for the new version) is linked to the Opportunity.

  • If you click into the ACME Membership that is linked above, you’ll see that it links to this Opportunity

  • If you navigate to the ACME Membership version that was replaced via this Opportunity, you’ll see that it still links to the Opportunity where it was originally created (or no link in the case of an Import to ACME)


Cancellation

When the ACME order contains a cancellation lifecycle action, an ACME Order is created that contains 1 line item for the cancellation: 


The Opportunity in SF then only contains 1 line item (Opportunity Product) for the Cancellation. Because no membership version was created in the order, there is no membership linked to the cancellation Opportunity:

The membership version that was canceled retains its link to the Opportunity where it was originally created. 



Note, if your cancellation rules are set to expire "on the transaction date", then they will expire EOD at 11:59 pm. Therefore, when recipes run mid-day and push cancellations to SF, the membership versions that were canceled will show an expiration date of EOD 11:59 pm and there standing will still be "Active". The standing will change to "Dropped" in ACME overnight and then the standings in SF will be updated to "Dropped" when the nightly Membership recipe runs.