Code Monkey home page Code Monkey logo

freshdesk-create_ticket_with_attachment's Introduction

Freshdesk: Create Ticket with Attachment

REQUIREMENTS

HOW TO USE

  1. First download the createTicket folder
  2. Place the folder on your PHP host
  3. Log into your Freshdesk Account / Create a Freshdesk Account
  4. Obtain your Freshdesk API Key
  5. Replace the following fields in submit.php; "YOUR_API_KEY" and "YOUR_DOMAIN"
    // Your agent API key
    $api_key = "YOUR_API_KEY";
    // Your Freshdesk subdomain 
      // For example "example.freshdesk.com" enter "example"
    $yourdomain = "YOUR_DOMAIN";
    
  6. Obtain your custom Freshdesk fields (if any exist) using the following methods:
    • cURL curl -u YOUR_API_KEY:X -X GET https://YOUR_DOMAIN.freshdesk.com/api/v2/ticket_fields > ~/Desktop/json.txt
    • If signed in as a Freshdesk agent go to https://YOUR_DOMAIN.freshdesk.com/api/v2/ticket_fields
  7. To use default/custom fields use the "name" field; custom fields are prepended by cf_
  8. Replace the example cf_ fields in this section of submit.php with your own
    // Custom Fields
    'custom_fields[cf_input_number]' => $input_number,
    'custom_fields[cf_input_text]' => $input_text,
    'attachments[]' => curl_file_create($file_path, "application/pdf", $file)
    
  9. Make sure any input field changes you make in index.php are reflected in the POST data section in submit.php
    // POST data
    $input_number=$_POST['input_number'];
    $input_text=$_POST['input_text'];
    $agent=$_POST['agent'];
    

freshdesk-create_ticket_with_attachment's People

Contributors

anthonyvadala avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.