{"info":{"_postman_id":"5e7411c0-d189-41c0-a6d2-ad6e91c5e73e","name":"TLV","description":"<html><head></head><body><p>TLV collection</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5358343","collectionId":"5e7411c0-d189-41c0-a6d2-ad6e91c5e73e","publishedId":"RWgm218P","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-10-01T13:24:16.000Z"},"item":[{"name":"Get oauth token","event":[{"listen":"test","script":{"id":"45e645d0-b2bc-4575-b8e6-8663c8510644","type":"text/javascript","exec":["//Parse response body. Extract oauthToken ","","var jsonData = pm.response.json();","pm.environment.set(\"oauthToken\", jsonData.access_token);","",""]}}],"id":"0facdcba-6d56-4e30-ad44-593409b065bf","request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"formdata","formdata":[{"key":"grant_type","value":"password","type":"text"},{"key":"client_id","value":"sugar","type":"text"},{"key":"username","value":"{{userName}}","type":"text"},{"key":"password","value":"{{userPass}}","type":"text"},{"key":"platform","value":"base","type":"text"}]},"url":"{{url}}/rest/v10/oauth2/token","urlObject":{"path":["rest","v10","oauth2","token"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0facdcba-6d56-4e30-ad44-593409b065bf"},{"name":"Find Contact by email","event":[{"listen":"test","script":{"id":"43ea4b8a-2663-48c6-9895-7b74dc1d20ae","type":"text/javascript","exec":["var jsonData = pm.response.json();","pm.environment.set(\"idContactFoundByEmail\", jsonData.records[0].id);","pm.environment.set(\"nameContactFoundByEmail\", jsonData.records[0].name)","","//console.log(jsonData.records[0].id);"]}}],"id":"36478b04-76b7-4d2a-b3df-9025081e8ddc","request":{"method":"GET","header":[{"key":"oauth-token","value":"{{oauthToken}}"}],"body":{"mode":"formdata","formdata":[]},"url":"{{url}}/rest/v10/Contacts?filter=[{\"email_addresses.email_address\":\"{{contactEmail}}\"}]&fields=name,email\n","urlObject":{"path":["rest","v10","Contacts"],"host":["{{url}}"],"query":[{"key":"filter","value":"[{\"email_addresses.email_address\":\"{{contactEmail}}\"}]"},{"key":"fields","value":"name,email\n"}],"variable":[]}},"response":[],"_postman_id":"36478b04-76b7-4d2a-b3df-9025081e8ddc"},{"name":"Create new TimeLine record","id":"5ee111b0-72ff-4549-b22f-e66b3c66a1e2","request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"oauth-token","value":"{{oauthToken}}"},{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"formdata","formdata":[{"key":"name_html","value":"<p><em>{{nameContactFoundByEmail}} delayed </em><img src=\"rest/v10/Notes/ad619aa8-c18e-11e8-a7c8-000c29996212/file/filename?force_download=0&amp;1521200638908=1&amp;platform=base\" alt=\"\" width=\"10\" height=\"10\" /> the payment of <strong style=\"color:red\">$400.00</strong> for <strong>a car loan</strong> for <strong style=\"color:blue\">3 days</strong>@<a href=\"{{url}}/#Contacts/{{idContactFoundByEmail}}\"> {{nameContactFoundByEmail}}</a></p>","type":"text"},{"key":"action_date","value":"2018-09-27T17:25:00+00:00","type":"text"},{"key":"event_id","value":"{{eventID}}","type":"text"},{"key":"parent_type","value":"Contacts","type":"text"},{"key":"parent_id","value":"{{idContactFoundByEmail}}","type":"text"},{"key":"context","value":"[{\"label\":\"Credit\",\"text\":\"Car loan\"},{\"label\":\"Loan amount\",\"text\":\"$20,000.00\"},{\"label\":\"Monthly payment\",\"text\":\"$400.00\"},{\"label\":\"Loan balance\",\"text\":\"$12,800.00\"}]","type":"text"}]},"url":"{{url}}/rest/v10/PX_Timeline","urlObject":{"path":["rest","v10","PX_Timeline"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5ee111b0-72ff-4549-b22f-e66b3c66a1e2"}]}