What is an acceptable way to print from app maker? - google-app-maker

I'm trying to figure out what the best way to print from App Maker. I have a guess management app and I need a way to print out guest passes from app maker. I have some ideas, but I'm not sure what would work or be the acceptable best practice. These will print out on a 4x6 thermal printer. Any working examples would be greatly appreciated. I've only managed to get option two below to work without css formatting.
1) Open the guest info in a page fragment and print it. This would need to print the page fragment as displayed, unsure if this is possible in app maker.
2) Create an html page by passing the guests information, open the page in a new tab and use windows print.
3) Use a mailmerge of sort on a document on google drive and print with cloud print. I'm worried that the lag time might make this slow. I'm also unsure if it's doable.
Thank You

It sounds like you want to manually print them.
You could have a 'Visitor Card' template saved as either a Google Document or Google Sheet. When the visitor signs in, duplicate that document, write your visitors information to the appropriate cells/positions, then save as a PDF in a Google Drive location.
All of the above can automated, so you'll simply have to have a tab open at the Drive location and then print the file once saved. The saving process shouldn't take any longer than 5-10 seconds, which I think is a reasonable timeframe.
Another option, which is more technical, is you directly send a request to your printer to print. Although, this would depend on your printer and technical capabilities.

Related

Extract leads From Google Maps using Python

there's a Chrome Extension called "Lead Extractor" that when you search i.e. "Barbers in New York" allows you to download a CSV file with a list of all the merchants with Address, opening hours, reviews count, phone number etc etc. ( for better understanding click HERE) Is there any way to do what this extension does using Python?
I tried to look around but I wasn't able to find much. Thank you! I am a novice and I automated the process with PYAutoguy, but the process is time consuming and sometimes it things get messed up and the cursors ends up roaming around aimlessly without downloading anything.

Is it possible to change contents dynamically which Alexa skill shows without any user actions?

I want to create a Photo Frame Skill for Echo Show.
I want to change photos triggered by external server (such as Firebase and so on).
Is it possible to change it dynamically without any user actions?
I saw Notification API and Proactive Events API.
But, These show notifications to user. I don't want to show anythings to user.
I want just trigger controlled from external server to change contents.
The answer depends a lot on the type of skill (for example if it is based on Alexa Conversations or not). But you can try exploring something along this line:
Keep the token of last rendered APL document
Send an APL ExecuteCommand directive from your skill server (https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-interface.html#executecommands-directive)
You can use one of the standard APL commands, depending upon your use case. One option is SetValue command (https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-standard-commands.html#setvalue-command) to modify the background image.
I want to create a Photo Frame Skill for Echo Show
Technically, a skill can last for a maximum of 5min30sec without any user interaction. Only if you provide a prompt that last for 4min then a reprompt that last for 90sec. It could be a blank audio. But Alexa is not suited for custom skills that stays live for a long time without user interactions.

Has anyone displayed a Salesforce Dashboard component on WordPress site? If so, how?

I work for a nonprofit which help disabled military veterans. We have all our participants register with us using Salesforce as the repository of their registrations. We have dashboard components in Salesforce Lighting which totals up the number of active participants we have. I would like to display the component on our WordPress site but have never done anything like that before. I was hoping to find someone who has done something like that and offer some direction on how to go about doing it.
I tried looking up WordPress plugins which integrate with Salesforce. Most seem to be geared towards sending registrations back and forth but not displaying information. From a little bit of research, it seems like coding might need to be involved. Maybe doing a REST API with a Post option which will send the data through an HTTP URI? But to my understanding is that it would require WordPress to be an API. I am sure there are gaps in my logic.
I dont have an extensive amount of programing language experience but am willing to learn. I have taken a few Java and JavaScript classes in school.
I have not attempted this yet. I am just looking for feedback and direction.
Few options here, in no specific order...
Do Wordpress users have real Salesforce accounts or is their data simply stored in SF? Ask your Salesforce admin if there's a "customer community" configured (if your SF org is really old he might refer to it as customer portal). Communities offer nice way of exposing SF to poeple who don't need full SF user licenses. Think like collaborating with real SF users on "My Cases", viewing reports & dashboards... But for this you'd really need people logged in to SF so it won't work if you want just something anonymous. Some more info
Another option might be using Sites (Visualforce pages that expose SF data to guest users). Think like displaying a product catalog, FAQ, web-to-lead form or some other generic "contact us" page that's anonymous. So if you have SF developer (or admin with good copy-paste skills) you could use some Visualforce charts. They can be 100% coded (like this) or fed data from a report (like this) so it's simpler for admin to change the report filters or something without really writing code. Not sure if the simple route will work on a Site, there are some old answers that say "No", you might have to try it out. Worst case you'd need Apex code (or JavaScript) to query SF for results and display them. And display that SF Site page as <iframe> in Wordpress.
A slight twist on the Sites option - do you use Chatter (bit like Twitter inside SF)? There's way to take a snapshot of a report when a milestone has been met and post it to chatter ("congrats for hitting X participants"). And embed feeds on Visualforce pages too. Docs
What SF edition you're on (Group/Professional/Enterprise...)? If you have API access to Salesforce you could query the info yourself from Wordpress and display it using whatever charting library's easiest for you (Google Charts, Flot...). There are tons of examples how to connect to SF from PHP (or maybe you could cannibalize a WP plugin). Technically it's one POST message to log in to SF and one GET to run a query (something as simple as SELECT COUNT() FROM Contact WHERE isActive__c = true?)
That'd be more or less everything in terms of pulling data out of Salesforce. I mean if you have API access enabled you can slice & dice it how you want, extract data with raw PHP code or use some middleware but overall idea doesn't change. Write queries yourself or use "Analytics API" to access report results (so your administrator has power to change it without coding)...
So how about pushing? SF could notify you about current participants count. At scheduled intervals or even realtime. That'd be "just" raw data though, you'd have to write visualisation yourself.
Plenty of options here
workflow rules (code-free), sends XML message to specified URL so you'd need a WP page that can "capture" the result. Could be sent on creation of new record or update of existing. Won't give you totals, it'd be data related to that particular record so you'd have to build kind of +1 / -1 counter... Or if you use a report + analytic snapshot (helper object to store report results) and have workflow on that - that could be really close to what's needed.
scheduled apex job to run some queries and send the results to you. Again - you'd need a WP url that can be called from SF
if there's a CometD plugin for Wordpress you should look at Salesforce Streaming API, Platform Events or (newer and even simpler to configure) Change Data Capture. Basically you "subscribe" to a topic (a SF query) and whenever SF data changes and SF decides it'd change the results of the query - it'd push the results to you. It's almost realtime. Too much to write about them, perhaps best if you'd try to click through some trailheads - SF self-paced training courses:
https://trailhead.salesforce.com/en/content/learn/modules/api_basics/api_basics_streaming
https://trailhead.salesforce.com/en/content/learn/modules/change-data-capture
https://trailhead.salesforce.com/en/content/learn/modules/platform_events_basics

Determine if page was loaded from history or from QR Code scan

Here's the situation. I am trying to implement a system in a restaurant where each table has its unique QR Code. The QR Code is fixed and hard printed on the table. My application is basically a web page and the QR Code is simply a web page address with an encrypted parameter which identifies the table.
This system is already protected (to a certain degree) from pranksters by only allowing orders to come from the IP address of the Wifi connection. So you need to be at least connected to the restaurant's wifi to use this page. Doesn't protect from people outside the building, but that is another issue.
The problem occurs if a user comes today and scans the code for table 3 and places an order. If the user comes later and sits at table 5, I don't know how to stop them from loading the previously scanned link (for table 3) and place an order for table 3.
Having constantly changing time stamped QR Codes would address the problem, but that is impossible since the QR codes are fixed.
Is there a way for the page to "know" that it has been loaded from a QR Code Scan, or whether it was loaded from the browsing history? We are talking about pages loaded on a smartphone, so I guess that complicates matters.
Any help or pointers would be greatly appreciated! :)
In short, no. There's usually no "refer" header which will tell you that a page has been loaded from a bookmark or retrieved from a scanner's history rather than scanned directly.
Having an ever changing QR code is not impossible (using eInk or a small display) but that doesn't solve the problem.
Here's how I would fix it.
User scans a code - example.com/table3 - the first thing they see is a map with table 3 highlighted on it.
Text says "If you're not at table 3, please scan the code on your table. If you are - click here to order." Or something like that.
Explain to the user that if they're not sitting at the correct table - someone else will get their food!

Build your own Street View with Google Street View API

Is there is a way to upload my own panoramic images of our hours/building using Google Street View API, then use Google Street View Engine to navigate throw them?
Yes, you need to make custom street view panoramas: https://developers.google.com/maps/documentation/javascript/streetview#CustomStreetView
Here's a great sample of someone who has done this: http://www.gta4.net/map/
I'm doing a similar project for a large building.
First, you need some way to generate a 360 degree panorama for the images. I've adapted hugin to be used in a set of bash scripts to generate the panos automatically in a Linux box. So, I just upload the images to a folder, execute the script with the folder location and number of images per panorama and leave it alone. Depending on the number of images you have per panorama, expect to wait 5-45 minutes for each panorama.
Second, check out the example link for how to use JS and StreetView. I think your task will be easier as you can probably write all your locations inside the JS file rather than relying on database calls and parsing.
Third, make sure your usage is under the limits set by the API if you're not paying for the service. If you go over the daily limit, the tour won't be available.

Resources