Mobile TTL server side replicate

Our mobile application create documents and we need to set a ‘ttl’ for this documents on couchbase server but mobile TTL seem to be not replicated.
Only solution we found is to set ttl with sync gateway web hook’s.
Is there any other solution ?

Are you trying to enforce a server side TTL on documents created by mobile app? Curious about the exact use case because it’s rather unusual for clients to be enforcing lifespans on server side when it doesn’t necessarily have the global view of the system (docs could be purged before its replicated to other clients?) .
In any case, you can use expiry() function to set the TTL of document being processed from within sync function

Server application create plannings who are replicate on users mobile application. This plannings have a ttl set at 6 month.
Mobile side, action documents are created to every users action’s.
After 6 months storage we want to clean every action doc link to planning doc.