Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Try 1
- 1. I use the HubSpot create an engagement api to create a call engagement with the following POST body:
- ```
- {
- "engagement": {
- "active": true,
- "ownerId": 1,
- "type": "CALL",
- "timestamp": 1409172644778
- },
- "associations": {
- "contactIds": [93801],
- "companyIds": [ ],
- "dealIds": [ ],
- "ownerIds": [ ]
- },
- "attachments": [
- {
- "id": 4241968539
- }
- ],
- "metadata" : {
- "toNumber" : "5618769964",
- "fromNumber" : "(857) 829-5489",
- "status" : "COMPLETED",
- "durationMilliseconds" : 0
- }
- }
- ```
- 2. Next, in-app I click on edit and edit the description to "hello world" (didn't hit save yet)
- 3. I then use the HubSpot update an engagement api to update the engagement using a PATCH/PUT request with the following body:
- ```
- {
- "metadata" : {
- "toNumber" : "5618769964",
- "fromNumber" : "(857) 829-5489",
- "status" : "COMPLETED",
- "durationMilliseconds" : 38000,
- "recordingUrl" : "https://api.twilio.com/2010-04-01/Accounts/AC890b8e6fbe0d989bb9158e26046a8dde/Recordings/RE3079ac919116b2d22",
- "body" : ""
- }
- }
- ```
- 4. Went back in-app, didn't refresh and click save
- # Try 2
- 1. I use the HubSpot create an engagement api to create a call engagement with the following POST body:
- ```
- {
- "engagement": {
- "active": true,
- "ownerId": 1,
- "type": "CALL",
- "timestamp": 1409172644778
- },
- "associations": {
- "contactIds": [93801],
- "companyIds": [ ],
- "dealIds": [ ],
- "ownerIds": [ ]
- },
- "attachments": [
- {
- "id": 4241968539
- }
- ],
- "metadata" : {
- "status" : "COMPLETED"
- }
- }
- ```
- 2. Next, in-app I click on edit and edit the description to "hello world" (didn't hit save yet)
- 3. I then use the HubSpot update an engagement api to update the engagement using a PATCH/PUT request with the following body:
- ```
- {
- "metadata" : {
- "toNumber" : "5618769964",
- "fromNumber" : "(857) 829-5489",
- "status" : "COMPLETED",
- "durationMilliseconds" : 38000
- }
- }
- ```
- 4. Went back in-app, didn't refresh and click save
- 5. You can validate that the details tab does not contain the new duration.
- *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