Functional Specification of Memberships/Discount cards application for BigCommerce system version 1.0 Prepared by the Private unitary enterprise SpurIT 2012
Table of contents Table of contents... 2 Revision History... 3 1. Abbreviations... 4 2. Introduction... 4 2.1. The Purpose of the application... 4 3. Overall Description... 4 3.1. General Principles of the System Interaction... 4 3.1.1. Interaction with the application on the shop administrator s side... 4 3.1.2. Interaction with the application on the customer s side... 5 4. System Interaction Particulars... 6 4.1. Application installation process... 6 4.2. Processing a customer s orders to calculate the Total Spent value.... 6 4.3. Sending notifications to customers... 7 4.4. Front-end functionality... 7 4.5. Back-end functionality... 8 4.5.1. Memberships page... 8 4.5.2. Customers page... 11 4.5.3. Assigned Customers page... 13 4.5.4. Discount Cards page... 16 4.5.5. Email templates page... 20 4.5.6. Promo page... 23 4.5.7. Update theme files page... 24 4.5.8. FAQ page... 25 2
Revision History Name Date Reason For Changes Version Dzmitry Yahorychau 16.04.2012 Document creation 1.0 3
1. Abbreviations Abbreviation BC API Description BigCommerce API 2. Introduction 2.1. The Purpose of the application The Memberships/Discount Cards application makes it possible for the shop administrator to create various client membership levels (e.g. Gold, Silver, Bronze) basing on the amount of money spent by them on purchases at the shop. A certain amount of expenses is defined for each client membership level. When a client reaches the amount set, he/she will automatically receive a corresponding membership level and a discount card. 3. Overall Description 3.1. General Principles of the System Interaction 3.1.1. Interaction with the application on the shop administrator s side The shop administrator can perform the following operations: - create/edit client membership levels - specify the amount of expenses allowing clients to gain a certain client membership level and a relevant discount card - specify discount codes for any client membership level - when needed, set discount codes individually for any client even if they were all assigned to one client membership level (e.g. this can decrease the possibility of code transfer to 4
other clients because you know who this or that code belongs to). In case when it is transferred to another client he/she can be deprived of the client membership level and the discount code) - if necessary, forcibly determine a membership level for a client even if he/she hasn t spent a specified amount of money in the shop (e.g. a client paid in cash) - when needed, forcibly disable membership level assigned to a client even if he/she has spent a specified amount of money in the shop (e.g. a client has broken rules of the web shop) - create/edit discount card images for any client membership level - create/edit templates of email messages sent to clients at the moment of assigning a client membership level. What is more, separate email templates can be created for any country supported by the shop. 3.1.2. Interaction with the application on the customer s side A discount card with a corresponding discount code is displayed at a client s personal page. The client will also receive an email notification that he/she has been granted a particular membership level. A membership level can be granted in two ways: 1) Automatically by the application itself 2) Manually by the administrator 3.1.2.1. Automatic assignment of a membership level The application at certain intervals initiates a script which calculates the build-up of a customer s Total Spent value of orders during the period starting from the moment of previous script execution. Only the orders of log-in users are considered. If the function of automatic assignment of membership level is enabled for a user and a specified Total Spent value sufficient for getting a membership level has been reached, an email notification is sent to the customer. Upon next log-in he/she will find a new discount card displayed. 5
3.1.2.2. Manual assignment of a membership level If the administrator, when manually assigning a membership level, selects the Send Email checkbox, the customer will receive an email notification. Upon next log-in he/she will find a new discount card displayed. 4. System Interaction Particulars 4.1. Application installation process 1. A BigCommerce shop administrator has to register at this application. 2. A user entry should be created at the BigCommerce shop administration panel by the administrator. An API access should be granted to this user. Upon his/her entry creation, the user is granted an API Path and API Token, which he/she should save at the Settings of the application. 3. The administrator enters the customer s username, API Path and API Token stored in the Settings. 4. For further use of the application, the shop administrator will use a login form provided by the application. 5. The application will work with BC API using the API Path, API token and username entered by the shop administrator. 4.2. Processing a customer s orders to calculate the Total Spent value. When the installation of the application has been finished the administrator starts the process of existing orders import to count the Total Spent value for the customers who have paid for their orders. Upon the completion of this procedure, the last order s date_modified value is saved in the database. Hereafter the script is run in accordance with a set schedule, e.g. once a day. It calculates Total Spent on orders for which the date_modified field value exceeds the last saved value. To avoid repeatedly using an order whose status may get changed when date_modified field value changes, only orders with the following statuses are considered: 6
- Completed the script adds the total_inc_tax value, contained in the order field, to the customer s Total Spent value. - Refunded the script subtracts the total_inc_tax value contained in the order field from the customer s Total Spent value. 4.3. Sending notifications to customers The customer receives notifications basing on the template specified in the Templates section of the application. Since an individual template can be accorded to any country, an API request is sent to retrieve a customer s address to choose an appropriate template. A first address is taken from the address list and then the template is selected according to the country s code specified in the country_iso2 field. The default template will be used if a template is not specified for that country in country_iso2. The shop name and URL will be inserted into the notification text. However, as far as API has no ability to retrieve names of shops and their domains, these fields are to be filled in by the shop administrator at the application s Settings page. 4.4. Front-end functionality To enable displaying of a discount card on a user s account page, the shop administrator should insert a specific code (JavaScript + %%GLOBAL_AccountCurrentEmail%%) into the theme template. This code will generate an AJAX-request to the application server which will produce the customer s Email address. Using it, the script at the application server will request - via BC API the customer s ID which is necessary for his/her identification and which always remains the same, unlike changeable E-mail addresses. When the ID has been received, the customer is selected from the database. Then, according to the value of his/her Total Spent field, the Membership level of the customer is determined as well as a discount card which corresponds to this value. If the customer s membership had been assigned by the administrator manually, the discount card will correspond to the assigned membership level. An HTML-code will be sent and displayed for the customer in reply to an AJAX-request. All the other functionality is developed within the application on the server side and BC API is not be used in this case. The mock-up of customer account page with the Bronze card is shown in picture 1. 7
Picture 1. The mock-up of customer account page with the Bronze card 4.5. Back-end functionality The Back-end represents a tool designed to manage membership levels, discount cards, Email templates and other settings. 4.5.1. Memberships page At this page the administrator can create, edit and delete Membership Levels, which are assigned to customers in accordance to the amount of money spent by them in the shop. The Membership page is shown in picture 2. 8
Picture 2. Memberships page fields: The Membership Levels table is the main element of the page. It comprises the following 1) Checkbox selection of a relevant level 2) Name (text) displays the type (name) of the level 3) Condition (text) shows the amount of money to be spent by the customer to gain a certain level. 4) Discount card (text) displays the membership level and a discount code (in brackets). 5) Actions (link) contains the Edit link for Membership Level editing. Besides the table, this page contains an Add membership button to add new Membership Levels and a Delete selected button to delete Membership Levels previously selected in their corresponding checkboxes. 4.5.1.1. Add Membership page At this page new Membership Levels are created. The page is opened by clicking on the Add Membership button at the Memberships page. The Add Membership page is shown in picture 3. 9
Picture 3. Add Memberships page The page includes the following elements: 1) Name of Membership (text field) Membership Name is entered here. 2) The minimum amount of money which should be spent by a customer to receive the specified level of membership (text field) is entered here. 3) Assign discount card (selection box) by using this field any created level can be linked to an appropriate discount card. Membership names taken from the Discount Cards page accompanied (in brackets) by the coupon code are displayed here. 4) Save button. 4.5.1.2. Edit Membership page This page is used to edit created Membership Levels. The page is opened by clicking on the Edit link at one of the Membership Levels listed on the Memberships page. The Edit Membership page is shown in picture 4. 10
Picture 4. Edit memberships page The page includes the following elements: 1) Name of Membership (text field) Membership Name is entered here. 2) The minimum amount of money which should be spent by a customer to receive this level of membership (text field) is specified here. 3) Assign discount card (selection box) using this field any created level can be linked to an appropriate discount card. Membership names taken from the Discount Cards page accompanied by a coupon code (in brackets) are displayed here. 4) Save button saves information, entered into fields of the Edit Membership page. 4.5.2. Customers page At this page the following operations can be performed: sending email notifications to customers assigned various Membership Levels, sorting users according to their Membership Level and enabling/disabling automatic assignment of Membership Levels to selected users. This page displays the names of customers whose Total Spent value has been calculated by the system and saved in the database. This list is not renewed in a real-time mode, it is updated according to the results of the script routine execution which calculates the Total Spent value at specified intervals. The Customers page is shown in picture 5. 11
Picture 5. Customers page The Customers page comprises two sections: Send email notifications and Customers. The Send email notifications section includes the following elements: 1) Email templates (link) a link to the Email templates page 2) Send notification to (selection box) here a choice can be made between sending messages to the customers at all Membership levels or at any particular one. 3) Send (button) starts the message sending procedure for all the customers with membership levels selected in the Send notification to selection box The Customers section includes the following elements: 1) Membership (selection box) in this list all Membership levels or any particular one can be chosen. 2) Filter (button) starts the filtration procedure of customers according to the value chosen in the Membership selection box. 3) Items per page (selection box) with this option the number of entries displayed in the table below can be chosen. 4) A list of users with the following fields: - Checkbox for selecting an appropriate user - Name (text) displays the selected user s name 12
- Email (text) displays the user s Email address - Total Spent (text) displays the amount of money spent by the user in the shop - Membership (text) displays Membership Level which was automatically assigned to the customer 5) Enable (button) enables the disables Membership Level which was automatically assigned to the customer 6) Disable (button) disables the Membership Level which was automatically assigned to the customer 4.5.3. Assigned Customers page This page makes possible manual assignment of Membership Levels to customers and disabling manually assigned Membership Levels. The Assigned customers page is shown in picture 6. Picture 6. Assigned Customers page The Assigned Customers page comprises the following elements: 1) Membership (selection box) this is an option to choose among all Membership levels and any single level included in this list. 2) Filter (button) starts customer filtration procedure according to the value chosen in Membership (selection box). 3) Users table with fields: 13
- Checkbox for selecting an appropriate user - Name (text) displays the selected user s name - Email (text) displays the user s Email address - Total Spent (text) displays the amount of money spent by the user in the shop - Membership (text) displays the Membership Level which was automatically assigned to the customer - Code (text) displays the code assigned to the customer. 7) Assign membership (button) manual assignment of Membership Level to the chosen customer. 8) Unassign manually added membership (button) disabling Membership Level which was manually assigned to the customer 4.5.3.1. Search Customers page At this page the search of customers and manual assignment of Membership Levels to selected users can be made. The page is opened by clicking on the Assign Membership button on the Assigned Customers page. The Search Customers page is shown in picture 7. Picture 7. Search Customers page 14
This page comprises the following elements: 1) Search customers (text field) serves for entering a user s name. If this field is not filled in, the list of all users in the system will be displayed at the click on the Search button. 2) Search (button) starts the searching procedure to find the user indicated in the Search Customers field. Upon clicking the Search button, the page shown in picture 8 is displayed. Picture 8. Assigning customer levels page This page includes the following elements: 1) Search customer (text field) here a user s name is entered. If this field is left unfilled, the list of all the users in the system will be displayed at the clicking of the Search button. 2) Search (button) starts the searching procedure to find the user indicated in the Search Customers field. 3) A table with the following fields: - Checkbox to select an appropriate user - Name (text) displays the selected user s name - Email (text) displays the user s Email address 15
- Total Spent (text) displays the amount of money spent by the customer in the shop - Membership (text) displays the Membership Level manually assigned to the customer 4) Membership (selection box) a membership level to be assigned to the customer can be chosen in this list. 5) Code (optional) (text field) here a code is assigned to the selected user 6) Send email (checkbox) when this checkbox is selected, the user will receive a message saying that his/her Membership Level has been changed. 7) Assign Membership (button) starts the procedure of manual assignment of Membership Levels to customer(s). 4.5.4. Discount Cards page At this page, viewing, editing, deletion and addition of new discount cards can be performed. The Discount cards page is shown in picture 9. Picture 9. Discount cards page The page includes the following elements: 1) Add new card (button) with this button a new card can be added. 16
2) A table with the following fields: - Checkbox choosing an appropriate discount card - Name of membership (text) displays the name of membership - Image (picture) shows a thumbnail of an uploaded image. It also serves as a link to a full-size image. By clicking on the thumbnail, a popup window with a full-size image is displayed. - Code (text) shows the code assigned to a particular Membership level - Actions (link) contains the Edit link for Membership editing 3) Delete selected (button) deletes memberships selected in the checkboxes. 4.5.4.1. Add Discount Card page At this page a new discount card is created. The page is opened by clicking on the Add new card button at the Discount cards page. The Add Discount Card page is shown in picture 10. Picture 10. Add Discount Card page The page comprises the following elements: 1) Name of Membership (text field) Membership Name is specified at this field 17
2) Coupon Code (text field) the coupon code for a discount card is specified at this field 3) Additional text (text field) any additional text to be displayed on the discount card can be entered at this field 4) Discount card image (file field) in this field the image of the discount card is added. 5) Resize image (checkbox) this field enables resizing images to the dimensions defined in the Width and Height fields. If 0 value is specified in one of these fields, the value of other one will be automatically calculated according to the value of the former. Thus, the image will be resized proportionally. 6) Width (text field) the image width value is defined at this field. At the resize option start-up, the discount card image will be resized according to this value. 7) Height (text field) the image height value is defined at this field. At the resize option start-up, the discount card image will be resized in accordance with this value. 8) Save (button) saves information, entered into the fields of the Add Discount Card page. 4.5.4.2. Edit Discount Card page At this page discount card editing is performed. The page is opened by clicking on the Edit link next to Discount card on the Discount cards page. The Edit Discount Card page is shown in picture 11. 18
Picture 11. Edit Discount Card page The page includes the following elements: 1) Name of Membership (text field) Membership Name is specified at this field 2) Coupon Code (text field) the coupon code for the discount card is specified at this field 3) Additional text (text field) any additional text to be displayed on the discount card can be entered into this field 4) Discount card image (file field) the field is used for addition of the image of the discount card. 5) Resize image (checkbox) this field enables resizing images to the dimensions defined in the Width and Height fields. If 0 value is specified in one of these fields, the value of other one will be automatically calculated according to the value of the former. Thus, the image will be resized proportionally. 6) Width (text field) the image width value is defined at this field. The image will be resized to this value at the resize option start-up. 19
7) Height (text field) the image height value is defined at this field. The image will be resized to this value at the resize option start-up. 8) Save (button) is used to save information entered into the fields of the Add Discount Card page. 9) The Discount card image with a possibility to move the texts entered in the Name of membership, Coupon code and Additional text fields using the Drag&Drop feature. 10) A table with the following fields: - Checkbox for choosing desired field values at the Discount Card (Name of Membership, Coupon Code and Additional text). - Text (text) the contents of the Name of Membership, Coupon Code and Additional text fields at the Discount Card. - Text Color (text field) this field value defines the color of a corresponding text. Either an HTML color code or any color chosen from the color picker can be entered here. - Font Size (text field) font size in pixels of a corresponding text can be defined at this field. 4.5.5. Email templates page At this page, viewing, edition, deletion and addition of new Email templates can be carried out. The Email templates page is shown in picture 12. Picture 12. Email templates page 20
The page includes the following elements: 1) Add new template (button) starts the creation of a new template. At the click on this button the Add Email Template page opens. 2) A table with the following fields: - Checkbox for Email address template selection. - Country (text) the country of the customer for whom the template is created - Subject (text) the Subject field value in the corresponding Email template - From (text) email address retrieved from the Email From field - Body (text) Template field value - Default (text) Default field value - Action (link) contains the Edit link for current template edition. The Edit Email Template opens by clicking on this link. - Delete selected (button) used to delete selected Email templates. 4.5.5.1. Add Email Template page This page is used to create new Email templates. The page opens by clicking on the Add new template button at the Email templates page. The Add Email Template page is shown in picture 13. A country should be chosen when adding/editing a template. The list of countries is requested via BC API. The template will be assigned to that country by the code specified in the country_iso2 field. 21
Picture 13. Add Email Template page The page includes the following elements: 1) Customer s Country (selection box) the customer s country value is chosen at this field. 2) Subject (text field) Email subject is specified in this field. 3) Email From (text field) the Sender Email address is specified in this field. 4) Template (text area) the Email template body text is entered in this field. 5) Set as default (selection box) defines that the current template is to be used by default. 6) Save (button) saves information entered in the fields of the Add Email Template page. 4.5.5.2. Edit Email Template page This page is used for Email templates edition. The page is opened by clicking on the Edit link of a chosen template at the Email templates page. The Edit Email Template page is shown in picture 14. 22
Picture 14. Edit Email Template page The page includes the following elements: 1) Customer s Country (selection box) the customer s country value is chosen at this field. 2) Subject (text field) Email subject can be edited in this field. 3) Email From (text field) the Sender Email address can be edited in this field. 4) Template (text area) the Email template body text can be edited in this field. 5) Set as default (selection box) defines that the current template is to be used by default. 6) Save (button) saves the information entered in the fields of the Add Email Template page. 4.5.6. Promo page This page displays the text of the Promo page. The text can be edited with the WYSIWYG editor and copied to the BigCommerce shop administration panel. The Promo page is shown in picture 15. 23
Picture 15. Promo page 4.5.7. Update theme files page The instruction for theme template changing for discount card displaying to the customer is placed here. The Update theme files page is shown in picture 16. 24
Picture 16. Update theme files page 4.5.8. FAQ page This page comprises a list of Frequently Asked Questions (FAQ). The FAQ page is shown in picture 17. Picture 17. FAQ page 25