I enabled push notifications in my whitelabel app and wish to send a push notification that when clicked opens the app to a specific view with the latest data available. The view in question is called Top Picks. The deep link expression I was planning to use when broadcasting the notification is below. Is it correct?
CONCATENATE("#view=Top Picks#at=", ENCODEURL(NOW()))
Thanks.
Solved! Go to Solution.
First, you are correct, the Workflow option is not available in the Publisher Pro public app.
Referring to your comment above, I too see that the Deep Link is not saved after entering the expression. This is a bug. Please open a bug post for it.
No. When a Push Notification is sent and presented, it has no context of WHICH app it is for. it is just presenting information. However, you can build your Deep Link expression to specify the specific app.
You should be using the LINKTOโฆ() navigation Deep Links. These have internal functionality used in building the navigation URL and they all provide a parameter to specify the app to go to.
Support for LINKTOโฆ() functions
https://www.appsheet.com/Support?q=LINKTO&hPP=10&idx=help&p=0&is_v=1
Thank you for your response. I was following the guide here -> https://help.appsheet.com/en/articles/1023058-app-column-type-deep-link
And it says that the โatโ parameter can used with a push notification to force a sync. The example they give is โCONCATENATE(โMyApp-123#at=โ, ENCODEURL(NOW())) will navigate to app โMyApp-123โ, force a sync, and display its default starting view.โ
So I donโt understand why this canโt be manipulated to go to view and force a sync instead of to an app.
You didnโt specify your complete end goal in the original post.
Using the CONCATENATE() method was the pre-cursor to the LINKTOโฆ() functions. You can still use that method to manually create the URL.
When using the LINKTOโฆ() functions, AppSheet will be maintaining how those URLโs are constructed and returned with no additional attention needed on the developer side - meaning if something critical changes that affects the URLโs, a developer would need to re-enter the app and change every location they created the Deep Links manually.
So, I would advise to use the LINKTOโฆ() functions whenever possible.
You can still add parameters to the URLโs constructed with the LINKTOโฆ() functions. In your case, I believe you can construct the link used in your Push Notification as:
CONCATENATE(LINKTOVIEW("view name", "app id"),"#at=", ENCODEURL(NOW()) )
I hope this helps!
#at=
should be &at=
(&
, not #
).
Good to know. Just for my education, when is the โ#โ symbol used in the URL? Is it only at the START of the parameter list?
The format of a (mostly) full URL:
https://{site}/{path}?{options}#{special}
at
is an option. Options are formatted like this:
{option1}={value1}&{option2}={value2}&...&{optionN}={valueN}
So just to confirm that this:
CONCATENATE("#view=Top Picks&at=", ENCODEURL(NOW()))
will work where I have replaced the #at=
with &at=
Or do I need to apply the correction to what WillowMobileSystems suggested i.e.:
CONCATENATE(LINKTOVIEW("view name", "app id"),"&at=", ENCODEURL(NOW()))
I recommend using LINKTOVIEW() as @WillowMobileSystems suggested.
CONCATENATE(LINKTOVIEW("view name", "app id"), "&at=", ENCODEURL(NOW()))
@Dilanjan_Fernando Is this working for you?
Because I always have to add an +1
at the end, as mentioned here:
So this would be:
CONCATENATE(LINKTOVIEW("view name", "app id"), "&at=", ENCODEURL(NOW()+1))
@Fabian Iโm still yet to test it because Iโm trying to avoid sending notifications more than once every 2 weeks to my users. Iโll probably test your method first since it is working you because I donโt want to risk sending a notification that leads users to old data.
@Fabian I entered CONCATENATE(LINKTOVIEW("Top Picks", "QLDSeniorsDiscounts-1222696"), "&at=", ENCODEURL(NOW())+1)
but got the error โArithmetic expression โ(ENCODEURL(NOW())+1)โ has inputs of an invalid type โUnknownโโ
So I sent a push notification with CONCATENATE(LINKTOVIEW("Top Picks", "QLDSeniorsDiscounts-1222696"), "&at=", ENCODEURL(NOW()+1))
instead and I received the notification but it didnโt take me to the Top Picks view nor did it force a sync.
You used:
(ENCODEURL(NOW())+1)
It should be:
(ENCODEURL(NOW()+1))
Notice where the parentheses are.
I used (ENCODEURL(NOW()+1))
when I sent out the notification but that hadnโt forced an app sync or taken the user to the specified app view.
The "&at=" & ENCODEURL(NOW() + 1)
trick only works to force a sync when used to navigate to a view within the app. Used with a link external to the app really has little or no effect. A user who is not in the app and clicks on a link into the app will automatically get the latest data available.
Please post a screenshot of your notification workflow configuration that includes the entire Notification Content section.
Based on this post, I played around with some Push Notifications I have in my app. I eventually want the capability described here anyway.
Using the Deep Link property in the Notify Workflow, I was able to navigate to another app AND I was also able to force a Sync in that app. Forcing a Sync is important for use cases were a new record has been added and the recipient might already have the app open.
I first applied an expression below to test navigating to another app (and actually tried a couple views to be certain I wasnโt just getting a default view):
LINKTOVIEW("Log Table", "IssueSample-526414")
Obviously you will need to update with your view name and your app-id.
Next I was able to force a Sync by applying @Steve 's suggested trick by updating the Deep Link expression to this:
โCONCATENATE(LINKTOVIEW(โLog Tableโ, โIssueSample-526414โ), โ&at=โ,ENCODEURL(NOW() + 1))โ
I also played with opening a specific row in the current app, etc. All seem to work very well.
I hope this helps someone!!!
Outstanding!
@WillowMobileSystems Thank you very much John. Posts like this have to be bookmarked
Hello! Could you show me what is the function to open the specific row
Thanks!
Sorry, I should have clarified my previous posts. My app is one that is available in the app stores and is under a Publisher Pro license. I suspect Iโve given the impression that my app was under one of the per user licences.
My process to send push notifications with the intention of triggering a sync when clicked is as follows:
Enter in a title and body in the fields under Broadcast Notifications
Enter the deep link expression (the expression shown was one I used recently that didnโt go to the view specified or force a sync when clicked) and click save
Click send notification (the deep link expression didnโt show up after pressing save on the deep link pop up in step 2)
I noticed everyone here is using the notification functionality under โBehavior > Workflowโ which I donโt think works for my license right?
First, you are correct, the Workflow option is not available in the Publisher Pro public app.
Referring to your comment above, I too see that the Deep Link is not saved after entering the expression. This is a bug. Please open a bug post for it.
I opened a bug post now, thanks
@Dilanjan_Fernando I took a look on my App and I saw, that Iโm Manually Constructing Deep Links as you can read at the end of this article:
This Deep Link should work for you:
CONCATENATE(โQLDSeniorsDiscounts-1222696#view=Top Picks&at=โ,ENCODEURL(NOW() + 1))
Thank you, I will try the new deep link in a couple of weeks time.
But am I right in thinking that broadcast notifications are still available for the publisher pro version?
They were last I checked but that was a month ago
User | Count |
---|---|
38 | |
35 | |
27 | |
23 | |
18 |