FxFactory URLs
Beginning with version 4.0.4, FxFactory recognizes and handles URLs with the fxfactory
scheme, e.g.
The first component of the URL, app, simply indicates that the URL is meant to be interpreted by the FxFactory application. This document describes how to pick subsequent parameters of the URL in order to create links on your website that can trigger actions in the FxFactory application.
Actions on Products
The link given earlier in this page also contains the path component store. This designates actions that affect products managed by FxFactory. To do something more interesting, you provide additional parameters in the URL. For example, the following URL will launch the FxFactory application and display information on Photo Montage:
fxfactory://app/store?product=photomontage&show
The part of the URL that follows the question mark is called the query. The first parameter of the query tells the FxFactory application which product we are interested in manipulating:
product=photomontage
Notice that we are simply providing the text photomontage to indicate “Photo Montage”. How does FxFactory know that the two are unequivocally the same? FxFactory will match the photomontage tag with the Info URL specified in the product. The text photomontage
happens to be the last part of the Info URL for that product:
https://fxfactory.com/info/photomontage
…which is abbreviated to …/info/photomontage
in the product editing UI of both the FxPack and FxTemplates.
In recent versions of FxFactory, all products have been required to have an Info URL that follows this scheme. The requirement makes it simpler to create custom URLs for your own products. |
---|
Should you happen to be shipping a product that does not use the standard Info URL format, you can also pass in the product's UUID to identify it, e.g.
product=92665E8D-0AAE-4D85-9AC6-0199BA9D3E80
To create a link that shows the product in FxFactory and brings up the order form, simply add a &buy
component to the URL:
fxfactory://app/store?product=photomontage&show&buy
If the product referred by the URL is not installed on the system, FxFactory will again the same tag to build a download URL. Add an extra parameter, name, to ensure that our UI spells out the full name of your product. For example, this is a bogus URL for a product named “Great Product”:
fxfactory://app/store?product=greatproduct&name=Great%20Product&show&buy
Notice that spaces cannot appear anywhere in the URL. The name parameter uses the escape sequence %20
to encode “Great Product” as Great%20Product
.
Conclusion
Custom URLs are used extensively in our online store to create links between our website and our application. FxFactory recognizes additional URLs not discussed in this document, but they have limited use for external websites.