Advertisement
Guest User

Untitled

a guest
Aug 28th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. # Try 1
  2. 1. I use the HubSpot create an engagement api to create a call engagement with the following POST body:
  3.  
  4.  
  5. ```
  6. {
  7. "engagement": {
  8. "active": true,
  9. "ownerId": 1,
  10. "type": "CALL",
  11. "timestamp": 1409172644778
  12. },
  13. "associations": {
  14. "contactIds": [93801],
  15. "companyIds": [ ],
  16. "dealIds": [ ],
  17. "ownerIds": [ ]
  18. },
  19. "attachments": [
  20. {
  21. "id": 4241968539
  22. }
  23. ],
  24. "metadata" : {
  25. "toNumber" : "5618769964",
  26. "fromNumber" : "(857) 829-5489",
  27. "status" : "COMPLETED",
  28. "durationMilliseconds" : 0
  29. }
  30. }
  31. ```
  32. 2. Next, in-app I click on edit and edit the description to "hello world" (didn't hit save yet)
  33.  
  34. 3. I then use the HubSpot update an engagement api to update the engagement using a PATCH/PUT request with the following body:
  35.  
  36. ```
  37. {
  38. "metadata" : {
  39. "toNumber" : "5618769964",
  40. "fromNumber" : "(857) 829-5489",
  41. "status" : "COMPLETED",
  42. "durationMilliseconds" : 38000,
  43. "recordingUrl" : "https://api.twilio.com/2010-04-01/Accounts/AC890b8e6fbe0d989bb9158e26046a8dde/Recordings/RE3079ac919116b2d22",
  44. "body" : ""
  45. }
  46. }
  47. ```
  48.  
  49. 4. Went back in-app, didn't refresh and click save
  50.  
  51.  
  52. # Try 2
  53. 1. I use the HubSpot create an engagement api to create a call engagement with the following POST body:
  54.  
  55.  
  56. ```
  57. {
  58. "engagement": {
  59. "active": true,
  60. "ownerId": 1,
  61. "type": "CALL",
  62. "timestamp": 1409172644778
  63. },
  64. "associations": {
  65. "contactIds": [93801],
  66. "companyIds": [ ],
  67. "dealIds": [ ],
  68. "ownerIds": [ ]
  69. },
  70. "attachments": [
  71. {
  72. "id": 4241968539
  73. }
  74. ],
  75. "metadata" : {
  76. "status" : "COMPLETED"
  77. }
  78. }
  79. ```
  80. 2. Next, in-app I click on edit and edit the description to "hello world" (didn't hit save yet)
  81.  
  82. 3. I then use the HubSpot update an engagement api to update the engagement using a PATCH/PUT request with the following body:
  83.  
  84. ```
  85. {
  86. "metadata" : {
  87. "toNumber" : "5618769964",
  88. "fromNumber" : "(857) 829-5489",
  89. "status" : "COMPLETED",
  90. "durationMilliseconds" : 38000
  91. }
  92. }
  93. ```
  94.  
  95. 4. Went back in-app, didn't refresh and click save
  96. 5. You can validate that the details tab does not contain the new duration.
  97.  
  98.  
  99. *NOTE* also IM trying setting `metadata.disposition` in the step 3 and it also stays unupdated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement