question

newuser-3e95cda3-1de0-43a6-bf17-b56080a177da avatar image

Skill enabement(activation) date

I have a scenario wherein, My skill is playing a song. I want to build this skill as ISP. I have only one content(URL).


As per policy, for One time purchase skills, user should get some content free and then other content can be charged based on the experience. Since I have only content which plays constantly I want it to be offered for some days and then I may charge the users based on their experience.


For e.g., I want that first 3 days after any user activates my skill, he gets to listen radio for free. After 3 days, I want to charge user basis the specified ISP specifications. I am implementing this in Node JS. I want your help in,


1. How do i check skill activation date(enablement) per user?

2. How do i validate skill activation date for every user and invoke paid intent?


Please help!

monetization
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Phil McGee avatar image
Phil McGee answered

You could do this with dynamoDB and persistent attributes. Save a flag called firstrun and use the epoch as a timestamp. On subsequent runs of the skill, check the time since that first stamp was saved. The guys at skilltemplates.com have some nice example vids of using persistence.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.