Unlock the full potential of our feature and take your skills to the next level! Dive into our Training Center and discover exclusive Best Practice resources that will elevate your implementation strategy. With expert tips and insider knowledge, you'll become a master in no time. Access the links below to learn more and gain a competitive edge.
Ready to get started? Our Training Center is just a click away: here.
*For more information about our Training center, please visit the article here.
You can use the following JavaScript to trigger an on-site upgrade/downgrade offer:
tp.offer.show({\nofferId: "Offer_ID",\ntemplateId: "Template_ID",\ndisplayMode: "modal",\ncheckoutFlowId: "Checkout_Flow_ID",\ntargetedTermId: "Target_term_ID", \n});
As the checkoutFlowId you would enter the ID of the Upgrade/Downgrade checkout flow (which is either created automatically once you select this flow option in a Composer Experience or you can add a new one manually under Manage > Checkout flows).
And as the targetedTermId you would enter the Term ID that the users have access to, and which should be able to upgrade to the new term in the offer. So the same value you would select in a Composer Experience here:
Note, that it's only possible to define one term ID for the targetedTermId parameter.
If you want to use the new onsite upgrades, you also need to pass offerType: "upgradeOffer".