Find Jobs
Hire Freelancers

Command Line Scripts to pull data from Zendesk

$30-35 USD

Completed
Posted over 12 years ago

$30-35 USD

Paid on delivery
I need command line scripts (PHP) to pull and write data to our CRM off a Cron Job. Script 1) Pulls data from our system and does the following: 1) Create [login to view URL], this file is replaced whenever the script is run 2) Write to [login to view URL], this file is appended to and not replaced when the script is run 3) Create [login to view URL] this file creates a list of the requesters, it is replaced whenever the script is run Script 2) 1) Read [login to view URL] and uses the data to get user information from the system. 2) create a CSV just with emails 3) create a CSV just with external-ids 4) create an XML with IDs, External ID, and email Script 3) Read an XML file to update the user information. ## Deliverables I need three Command Line PHP Scripts that I'll Cron every x minutes First Script, I need to pull some data from a ZenDesk xml feed. That creates two XML files and one CSV file with different information: **First Script ****First Created File ****Get Product Traffic** The first script should read this field: <field-72464 type="">Product</field-72464> and create an XML file formed like this, this file should keep on adding elements to the file and not replace its contents. ([login to view URL]) <ticket_traffic> <product> <product_name>Product 1</product_name> <count></count> <datetimestamp>MM:DD:YY:HH</datetimestamp> </product> <product> <product_name>Product 2</product_name> <count></count> <datetimestamp>MM:DD:YY:HH</datetimestamp> </product> </ticket_traffic> It should also create a second XML file with the above information called [login to view URL] that gets replaced every time the Cron job executes **Second Created File ****Get Requesters** The first script should This file should read this node: <requester-id type="integer">12707077</requester-id> and create an XML ([login to view URL]) file that gets replaced everytime the CRON job executes <requesters> <requester-id type="integer">12707077</requester-id> <requester-id type="integer">12707078</requester-id> <requester-id type="integer">12707079</requester-id> </requesters> This is what the full XML looks like: <tickets type = "array" count = "49"> <ticket> <assigned-at type="datetime">2011-12-07T15:41:15-08:00</assigned-at> <assignee-id type="integer">99956666</assignee-id> <assignee-name type=""></assignee-name> <base-score type="integer">120</base-score> <created-at type="datetime">2011-12-07T09:40:50-08:00</created-at> <current-collaborators nil="true"/> <current-tags> </current-tags> <description> </description> <due-date type="datetime" nil="true"/> <entry-id type="integer" nil="true"/> <external-id nil="true"/> <field-72464 type="">Product</field-72464> <group-id type="integer">13150</group-id> <initially-assigned-at type="datetime">2011-12-07T15:41:15-08:00</initially-assigned-at> <latest-recipients nil="true"/> <nice-id type="integer">1135592</nice-id> <organization-id type="integer" nil="true"/> <original-recipient-address nil="true"/> <priority-id type="integer">0</priority-id> <recipient nil="true"/> <req-name type=""></req-name> <requester-id type="integer">12707077</requester-id> <resolution-time type="integer" nil="true"/> <solved-at type="datetime" nil="true"/> <status-id type="integer">1</status-id> <status-updated-at type="datetime">2011-12-14T15:00:58-08:00</status-updated-at> <subject>hacked</subject> <submitter-id type="integer">12707077</submitter-id> <ticket-type-id type="integer">2</ticket-type-id> <updated-at type="datetime">2011-12-14T15:00:58-08:00</updated-at> <updated-by-type-id type="integer">1</updated-by-type-id> <via-id type="integer">0</via-id> <score type="integer">120</score> <problem-id nil="true"/> <channel nil="true"/> <permissions></permissions> </ticket> </tickets> **Second Script **This script is executed after the first scripts creates the [login to view URL] file This script reads through the XML and gets the user information from the database and creates THREE files, that are replaced every time the script executes: The THREE CSV store a list of information: [login to view URL] stores: <users> <user> <id type="integer">14677512</id> <external-id>1002830271</external-id> <email></email> </user> </users> the [login to view URL] just stores: <external-id>1002830271</external-id> the [login to view URL] stores: <email></email> The XML looks like this: <user> <created-at type="datetime">2010-07-19T21:25:34-07:00</created-at> <details nil="true"/> <external-id>1002830271</external-id> <id type="integer">14677512</id> <is-active type="boolean">true</is-active> <last-login type="datetime">2011-12-08T23:00:40-08:00</last-login> <locale-id type="integer">1</locale-id> <name></name> <notes>PID: 157085325</notes> <openid-url nil="true"/> <organization-id type="integer" nil="true"/> <phone nil="true"/> <restriction-id type="integer">4</restriction-id> <roles type="integer"></roles> <time-zone>Tijuana</time-zone> <updated-at type="datetime">2011-12-09T17:22:37-08:00</updated-at> <uses-12-hour-clock type="boolean">true</uses-12-hour-clock> <current-tags/> <email></email> <is-verified type="boolean">true</is-verified> <photo-url> [login to view URL] </photo-url> <groups type="array"/> </user> **THIRD SCRIPT** Finally, the Third Script Updates the database with a script formed like this: <users> <user> <id type="integer"></id> <external-id></external-id> <email></email> <organization-id></organization-id> </user> </users> The attached file contains a library you can use to get the data from our test database area. There is no that much content there. The other file is an example to get the view. More information about using the library is available here: <[login to view URL]> and about the Zendesk API here: <[login to view URL]>
Project ID: 3759101

About the project

1 proposal
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$29.75 USD in 15 days
5.0 (63 reviews)
4.7
4.7

About the client

Flag of UNITED STATES
San Francisco, United States
5.0
35
Payment method verified
Member since Dec 20, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.