├── app.css ├── .gitignore ├── assets ├── logo.png └── logo-small.png ├── manifest.json ├── app.js ├── translations └── en.json ├── README.md └── LICENSE /app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | tmp -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/add_cc_app/master/assets/logo.png -------------------------------------------------------------------------------- /assets/logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zendesk/add_cc_app/master/assets/logo-small.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Add CC App", 3 | "author": { 4 | "name": "Zendesk Services / Pierre Nespo", 5 | "email": "services@zendesk.com" 6 | }, 7 | 8 | "parameters": [ 9 | { 10 | "name": "cc_field_id", 11 | "type": "number", 12 | "required": true 13 | } 14 | ], 15 | 16 | "defaultLocale": "en", 17 | "private": true, 18 | "singleInstall": true, 19 | "noTemplate": true, 20 | "location": "ticket_sidebar", 21 | "version": "1.0", 22 | "frameworkVersion": "1.0" 23 | } 24 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | return { 4 | events: { 5 | 'app.activated':'onAppActivated' 6 | }, 7 | 8 | onAppActivated: function(app) { 9 | if (app.firstLoad) { 10 | _.defer(this.initialize.bind(this)); 11 | } 12 | }, 13 | 14 | initialize: function() { 15 | var ccs = this.ccs(), 16 | currentCCs = _.map(this.ticket().collaborators(), function(c) { return c.email(); }); 17 | 18 | if (_.any(ccs)) { 19 | _.each(ccs, function(cc) { 20 | if (!_.contains(currentCCs, cc)) { 21 | this.ticket().collaborators().add({ email: cc }); 22 | } 23 | }, this); 24 | } 25 | 26 | }, 27 | 28 | ccs: function() { 29 | var ccsFieldLabel = helpers.fmt('custom_field_%@', 30 | this.setting('cc_field_id')), 31 | ccsFieldValue = this.ticket().customField(ccsFieldLabel) || ""; 32 | 33 | return ccsFieldValue.split(' '); 34 | } 35 | 36 | }; 37 | 38 | }()); 39 | -------------------------------------------------------------------------------- /translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "package": "app_name", 4 | "description": { 5 | "value": "Add CC App", 6 | "title": "app description" 7 | }, 8 | "name": { 9 | "value": "Add CC App", 10 | "title": "app name" 11 | }, 12 | 13 | "parameters": { 14 | "cc_field_id": { 15 | "label": { 16 | "value": "CCs field id", 17 | "title": "cc field id label" 18 | }, 19 | "helpText": { 20 | "value": "The id of the custom field that holds the CCs.", 21 | "title": "cc field id helpText" 22 | } 23 | } 24 | } 25 | }, 26 | 27 | "loading": { 28 | "value": "", 29 | "title": "loading placeholder" 30 | }, 31 | 32 | "fetch": { 33 | "done": { 34 | "value": "Good", 35 | "title": "fetch success" 36 | }, 37 | "fail": { 38 | "value": "failed to fecth information from the server", 39 | "title": "fetch failure" 40 | } 41 | }, 42 | 43 | "id": { 44 | "value": "ID", 45 | "title": "user id" 46 | }, 47 | 48 | "email": { 49 | "value": "Email", 50 | "title": "user email" 51 | }, 52 | 53 | "name": { 54 | "value": "Name", 55 | "title": "user name" 56 | }, 57 | 58 | "role": { 59 | "value": "Role", 60 | "title": "user role" 61 | }, 62 | 63 | "groups": { 64 | "value": "Groups", 65 | "title": "user groups" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :warning: *Use of this software is subject to important terms and conditions as set forth in the License file* :warning: 2 | 3 | # Add CC App 4 | 5 | ## Description 6 | 7 | Have you ever wanted to allow your end-user to be able to define CC upon a new request? This App will automatically add the end-user requested CCs as soon as an agent picks up the ticket. 8 | 9 | The way this App works is by grabbing CCs that have been entered as text by the end user upon submission and adding them as CCs as soon as the first agent opens the ticket. The limitation here is that the CCs aren't added until the ticket is opened for the first time in the Agent interface. 10 | 11 | :no_entry: THIS IS A NO TEMPLATE APP - IT WILL NOT SHOW ANYWHERE :no_entry: 12 | 13 | ## App location: 14 | 15 | * Ticket sidebar (This is a No Template App) 16 | 17 | ## Set-up/installation instructions: 18 | 19 | ### 1. Create a custom field to hold the CCs 20 | 21 | ![](http://cl.ly/image/412H2l3y341F/Screen%20Shot%202014-01-14%20at%2010.55.10.png) 22 | 23 | ### 2. Configure the app 24 | 25 | Report the previously created field ID in the settings of the app: 26 | 27 | ![](http://cl.ly/image/3g2g2B2y1o0W/Screen%20Shot%202014-01-14%20at%2011.15.30.png) 28 | 29 | ### 3. Test the app 30 | 31 | Create a ticket from your Help Center / Web Portal with CCs and open the ticket in the new Zendesk. The CCs should have been added to the ticket. 32 | 33 | ## Contribution: 34 | 35 | Pull requests are welcome. 36 | 37 | ## Screenshot(s): 38 | 39 | See description section as to why no screenshot is available. 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013 Zendesk 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Capitalized terms used herein have the meaning set forth in the Zendesk, Inc. 16 | (“Zendesk”) Terms of Service (available at www.zendesk.com/company/terms) (the “Terms”). 17 | The software made available herein constitutes “ZendeskLabs Software” which may be 18 | implemented to enable features or functionality to be utilized in connection with a 19 | subscription to the Service. 20 | Notwithstanding anything to the contrary set forth in the Terms or any other 21 | agreement by and between you and Zendesk, ZendeskLabs Software is provided 22 | “AS IS” and on an “AS AVAILABLE” basis, and that Zendesk makes no warranty 23 | as to the ZendeskLabs Software. 24 | 25 | ZENDESK DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 26 | TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 27 | NONINFRINGEMENT AND THOSE ARISING FROM A COURSE OF DEALING OR USAGE OF TRADE 28 | RELATED TO THE ZENDESKLABS SOFTWARE, ITS USE OR ANY INABILITY TO USE IT OR 29 | THE RESULTS OF ITS USE. 30 | 31 | Use of ZendeskLabs Software is subject to the following risks and conditions: 32 | (i) the ZendeskLabs Software is not an component of the Service that 33 | has been designed for commercial release for by Zendesk; 34 | 35 | (ii) the ZendeskLabs Software may not be in final form and may contain errors, 36 | design flaws or other problems; (iii) the ZendeskLabs Software is not expected to 37 | function fully or adequately upon installation, and it is expected and anticipated that 38 | further testing, modification and development may be necessary to make the 39 | ZendeskLabs Software functional; 40 | 41 | (iv) it may not be possible to make the ZendeskLabs Software functional; 42 | 43 | (v) use of the ZendeskLabs Software may result in unexpected results, loss of data, 44 | project delays or other unpredictable damage or loss; and 45 | 46 | (vi) Zendesk is under no obligation to release and/or offer for sale commercial 47 | versions of the ZendeskLabs Software, and Zendesk has the right to unilaterally 48 | abandon development or availability of the ZendeskLabs Software at any time and 49 | without any obligation or liability to You. You further agree that Zendesk shall 50 | have no obligation to correct any bugs, defects or errors in the ZendeskLabs Software 51 | or otherwise to support or maintain the ZendeskLabs Software. 52 | 53 | If you elect to utilize any ZendeskLabs Software, you are agreeing to release Zendesk 54 | from any claim with regard to the ZendeskLabs Software, its operation, availability or 55 | its failure to operate or be available. Without limiting the generality of the foregoing, 56 | 57 | You acknowledge and agree that neither the use, availability nor operation of any 58 | ZendeskLabs Software shall be subject to any service level commitment applicable to the Service. 59 | --------------------------------------------------------------------------------