Can I Customize Square Appointments Booking Flow? - square-connect

We use Square to book appointments in our showroom. In an effort to optimize this booking page, I want to create a funnel and track clicks. According to their documentation it looks like the only way do this is via embed and I do not see anything about appointments in their api documentation.
I really just want to track user clicks within the booking process and create some sort of conversion success page after the booking is complete. Any ideas?

There is not a way to do what you're looking for using the Square API. If you have access to the machine, I'm sure there's some way you could track clicks on the booking page (e.g. using a browser extension), but you wouldn't be able to make any changes to the Square UI.
Incidentally, Square is constantly making improvements to various aspects of the UI so that they will be more effective for all merchants. I do not personally know much about Appointments, but I expect that people are working to optimize it for you :).

Related

CRM 2013/2015/2016 subgrid popout, retain fetchxml query

I have a subgrid on my form which I assign a dynamically generated fetchxml query using javascript. When the user clicks on the subgrid's "pop out" button, the query is lost and it displays the default view for that entity.
The user needs to be able to perform multi selection and bulk editing. As far as I know this is not possible for subgrids in CRM 2013 upwards. Is there a way to retain the query when it is popped out?
There's no supported way to interact with a popped out grid. If you started digging into the client side application code, you might be able to find a hook to the new window, but doing so would be unsupported, liable to break, and I wouldn't recommend it.
I was going to suggest hiding that pop-out button on your entity's sub-grid altogether before re-reading that your users need to use the popped out grid for bulk edit.
In that case your best option will be to do ditch the JS and move to a RetrieveMultiple plugin against the sub-entity. RetrieveMultiple plugins should be generally avoided, but from what it sounds like in your case, it's your only option.
And, just to be thorough, are you positive you need dynamic fetch for the sub-grid? Is there any way you could come up with a view that would get close enough to your requirement, even if it's not perfect?
Update:
Based on the additional information you provided in your comment, I can only think of two options:
Implement a custom grid--or modify one of the free ones out there--that allows multi-select and bulk edit
Your custom web app takes the user's criteria, creates a personal view (entity: userquery) for the user and saves it to the database, then your JS on the form sets the grid to that view.
You can do that liks this:
document.getElementById("someGridId").control.SetParameter("viewtype", "4230"); // 4230 is the objecttypecode for userquery
document.getElementById("someGridId").control.SetParameter("viewid", "{11310965-0306-E611-80E5-3863BB36DD08}");
Doing this actually does make the popped out grid load the personal view, but in my tests just now the grid gets upset if you try to refresh it.
This approach has obvious downsides: 1) You have to come up with a way to clean up the personal views that get generated 2) the grid might break on refresh 3) it's unsupported and liable to break on an update.
Still worth considering, I suppose.
A more supported way instead of using unsupported getElementById is to hook a plugin to multiple retrieve of the entity and amend the query in there
Chris

Composite Fields In MSCRM 2013

I have a question on the subject of composite attributes that I would be grateful if you could help me with.
I posted this before on other question blogs but got no response I am satisfied with.
I am writing JavaScript that will update the fields (i.e. address1_line1, address1_line2, address1_line3, address1_city, address1_stateorprovince, address1_postalcode, address1_country) in the composite (address1_composite). When the fields are updated the composite does not seem to update. I have to open the composite and close it again. Is there a way of doing this automatically in JavaScript?
I have tried the following ideas:
Idea 1:
Xrm.Page.data.entity.save();
This is recomended at http://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu.aspx
This is not any good as my customers want to view the composite before saving the page. Also I would not want to save the page for my customers as they do not want this. They would like to decide when to do this themselves.
Idea 2:
Xrm.Page.data.refresh();
This is not really what I wanted as I do not want to refresh the whole page. I just want to refresh the composite. Also it bring up a popup that warns you about not having saved the page which will be annoying for my customers.
Idea 3:
Writing the address from the address lines to the composite.
This feels like a nasty hack.
There is probably more than one way of doing this. I used the function
Xrm.Page.getAttribute("address1_composite")._attribute.setValueForCompositeField();
I do not like this for the following reasons:
This is a hack as it is not using the system functionality of the done button to write the data.
You do not get the system formatting you get with the done button although this will get done when the form is saved so it is not so bad.
In the future if customers are allowed to add their own composite fields it could cause problems as the field names could be different.
It requires me to write extra code for each form that has a composite which has fields with different schema names. E.g. I have to write different code for forms with ShipTo and BillTo addresses as the code for the account form will not work.
Another idea was to set the focus to the composite field after a change has been made to any of the fields inside the composite.
Xrm.Page.data.entity.attributes.get("address1_composite").controls.get(0).setFocus();
This is the best idea so for but it is far from perfect. This forces the user to press the done button and hence the fields will be written. I was hoping for something more automated.
My Question:
What would be great is if there was a way to click the composite done button in JavaScript. This would give me the formatting of the done button and the automation I need.
Update - 14/04/2014
Since posting this question I have been in contact with Microsoft and they say there is no supported way of clicking the done button via a program.
If the field is locked down CRM JavaScript does not send the data back to the server for updating. Another approach would be:
perform the update using JavaScript (so the user sees the change); and
use a server side plugin on the Update event so the value is persisted.

Use events or virtual pageviews for Google Analytics and ajax

What makes more sense (or is proper according to google)? Registering an event or a virtual pageview with Google Analytics when tracking navigation through a webpage with heavy use of ajax?
I had been using events to track this kind of thing, but I find myself kind of emulating the pageview mechanism by tracking the clicks through events like the following:
_gaq.push(['_trackEvent', 'signup', 'clicked', 'header']);
should I instead be creating virtual pageviews when visitors click on links that call AJAX and bring up dynamic content?
_gaq.push(['_trackPageview', '/signup/form']);
If this is a new content that user navigates to, then you should be using virtual pageviews.
If you use events for all navigation then some metrics will be unreliable like pages/visit, avgTimeOnPage, avgTimeOnSite, pageDepth. If you use pageviews for navigation these metrics will be closer to the truth.
Since not so long ago, you couldn't set up goals for events, which made virtual pageviews the way to go. These days, you can set up event goals, so the question is certainly valid.
What you can do with virtual pageviews (and not with events) is to visualize a funnel. If you want to follow the path of your visitors, I'd recommend a virtual pageview.
If you're using events, you can only find out that some time during the visit, the visitor opened the form. With virtual pageviews you can see in what preceeded the form, what lead the visitor to it.
I would go with the event tracking for more information about the event. Showing an in-page form that doesn't change the content is more of an event, but it's not really down to that, but rather how you need to report it.
Using pageviews for dynamic events within page would inflate the actual pageview numbers and since you can use events as goals in the new UI, there is no reason to track them as pageviews anymore.

Alternative to dropdown menu?

It seems like less and less dropdown menus are being implemented with new websites. Can't say that I agree or disagree that adding a dropdown adds more functionality, although I would side with the verifiable truth that they reprobate senselessness which undoubtedly effects the user experience in particular, the key ingredient apart from a content rich site imo.
With a database driven site, I know there are tons of methods for satisfying users with an intuitive navigation system contrary to dropdowns. What are some perceptive navigation techniques for designating php forms and article topics to users with minimal user input?
I'm in the process of writing a php script to compare multiple user sessions but I've hit a wall as to what to use this for.
Any thoughts?

MVC design question for forms

I'm developing an app which has a large amount of related form data to be handled. I'm using a MVC structure and all of the related data is represented in my models, along with the handling of data validation from form submissions. I'm looking for some advice on a good way to approach laying out my controllers - basically I will have a huge form which will be broken down into manageable categories (similar to a credit card app) where the user progresses through each stage/category filling out the answers. All of these form categories are related to the main relation/object, but not to each other.
Does it make more sense to have each subform/category as a method in the main controller class (which will make that one controller fairly massive), or would it be better to break each category into a subclass of the main controller? It may be just for neatness that the second approach is better, but I'm struggling to see much of a difference between either creating a new method for each category (which communicates with the model and outputs errors/success) or creating a new controller to handle the same functionality.
Thanks in advance for any guidance!
My preference would be to create triplet Form-Controller-Model for every form displayed to the user. Whenever user clicks on 'Next' button on a form its controller should talk to the back end manager which takes care of dispatching submit request to the next form in chain. Vice verse if 'Back' button is clicked. Last form has a 'Finish' button which will go to the manager and pass the last bits of information.
This will avoid inheritance, make your code more robust and testing of forms possible in isolation.
My preference would be to keep it all in one controller. It keeps all the relevant processes for filling out the application/form in one place, although I'm not sure how "massive" you're talking about. If you do decide to split it out, I would not subclass off of the main controller, but just make a handful of independent controllers, perhaps related by name for ease of use down the road.

Resources