Booking returns continues to be a hot topic, as it can save you significant costs and time by having this process in place. We understand that it can be complicated due to the various workflows, applications, and partners involved in the return flow chain.
It's already possible to book return shipments in MyTranssmart, via SOAP Webservice or RESTful API. You can also implement nShift Returns for a fully integrated flow.
We now also offer a simple service that allows you to add a returns form to your website using our script generator. This feature allows your customers to easily print a return label directly from your website. Follow the instructions in this article to configure and generate the code needed to embed an nShift Transsmart return form on your website.
Generate the script
Go to the configuration page found in the menu Manage account >Returns:
-
Enable the Embedded Return Form.
- Select the Dispatch location. This is the warehouse where the return should be sent to.
(The values in the dropdown are taken from Manage account > Location & Cost Centers > Dispatch locations).
- Select one or more Booking profiles that should be available on the returns form page. The return order will be created using a booking profile that you select or you can allow your customer to choose, such as the carrier they prefer for returning the package. It will use the Carrier, Service level, Service level other, and optionally the Cost center, Incoterms, Payment terms, and Mail Type from the booking profile. (The values in the dropdown are taken from the menu Manage account > Booking Profiles).
- Select one or more Packages that should be available on the returns form page. The return order will be created using a package selected by you or by your customer if you give them the option to choose. It will use the dimensions from the selected package. (The values in the dropdown are taken from the menu Manage account >Packages).
- Click the Generate script button. The script will now be generated. This may take a few moments. Copy and paste the script to your website. This might be a job for your webmaster/ developer. You must be able to edit the source code of the page to embed the form. The server-side language of the page (i.e. PHP, .NET, Ruby, HTML only, or other) is not important, as the form script is pure javascript and will work in any type of page (since the form is generated client-side).
- Click the Save button to save your configuration. Please note that the script will disappear since we do not store it in MyTranssmart. If you need it, simply click the Generate script button again.
For developers: Notes about jQuery and CSS styling
The form script relies on the jQuery javascript library. This library is commonly used, so in many cases, it will already be loaded on your website. Our form script will check if jQuery is present, and if not, it will be loaded.
Additionally, our form script uses the jQuery.noConflict() method to remove jQuery from the "$" variable. Thus, jQuery functions will be called on "jQuery" and not on "$". This means that our form should work alongside other libraries using "$" as top-level variable (for instance Prototype or MooTools).
You may want to change the look of the return form - i.e. change the width, the font face, the background colors, or make other adjustments. This can be done by adding CSS rules to the page after the default styles have been loaded. You can override the default CSS rules or add your own rules. Look for the place in the script that says:
<style type='text/css'>
/* Insert custom CSS here to change the form styles */
</style>
If you need to see the default CSS, you can inspect the form using Google Chrome’s inspector to see the default styles for each element.