Can we expire portal link after certain timeframe?

Certified Lead Developer

Hello All,

As we have capability to generate the encrypted links for portal using a!urlForPortal(), is there any ways for expire these generated links for portal?

Scenario: I will generate the portal link with unique id using a!urlForPortal() and send it to customer within email. Customer can perform certain action and complete the form in portal, I am expecting customer to complete that form within certain time limit, if customer submit or do not complete that form within given timeframe, I want to restrict the customer to access that link.

Please share your thoughts, suggestions to implemented this.

Thanks!

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Senior Developer

    To implement link expiration for generated portal links using a!urlForPortal().
    As you mentioned, generate a unique identifier for each link.
    Store the timestamp when each link is generated along with its unique identifier.
    Determine the time limit for link access.
    Whenever a customer accesses the link, check the current time against the stored timestamp and the defined expiry time. If the link has expired, restrict access.
    If the customer completes the form within the given timeframe, update the status of the link to indicate that it has been used.
    Implement a scheduled process to periodically check for expired links and remove them from the system.

  • 0
    Certified Lead Developer
    in reply to Shubham Aware
    If the link has expired, restrict access.

    This is what I was thinking too.  The added benefit of this approach is, of course, the ability to actually show the end user a useful expiration message (and followup instructions, etc, if needed), as opposed to whatever nonsense they might normally get from clicking on a dead link.

Reply Children