in a suitecommerce custom extension, how can i acc...
# ask-stanley-ai
e
in a suitecommerce custom extension, how can i access the touchpoint urls
c
AI generated answer (using internal Slack threads):
In a SuiteCommerce custom extension, you can access the touchpoint URLs using the
getAbsoluteUrl
method from the
Session
module. Here's an example of how you can use it:
Copy code
javascript
define('MyModule'
, [
    'Session'
  ]
, function (
    Session
  )
{
    'use strict';

    return  {
        mountToApp: function mountToApp (container)
        {
            var checkoutURL = Session.get('touchpoints.checkout');
            var absoluteCheckoutURL = Session.getAbsoluteUrl('checkout', checkoutURL);
            console.log(absoluteCheckoutURL);
        }
    };
});
In this example,
Session.get('touchpoints.checkout')
gets the relative URL for the checkout touchpoint, and
Session.getAbsoluteUrl('checkout', checkoutURL)
converts it to an absolute URL. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.800029755
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.789996207
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.786182821
Please provide your feedback on this answer.