APIs & Integrations

khangnb
Member

Can not create engagement with type CALL for contacts

SOLVE


#Python Code

When i create engagement with type=CALL(https://developers.hubspot.com/docs/methods/engagements/create_engagement), but it was not.
I need fix soon.
Thanks

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Can not create engagement with type CALL for contacts

SOLVE

Hi, @khangnb.

Yes, WAV files are supported. I successfully created another engagement on this contact record with a WAV file and it plays.

I used the following body:

{
    "engagement": {
        "active": true,
        "ownerId": "",
        "type": "CALL",
        "timestamp": 1546871864663
    },
    "associations": {
        "contactIds": [2101],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
	"metadata" : {
	    "toNumber" : "1234567890",
	    "fromNumber" : "(987) 654-3210",
	    "status" : "COMPLETED",
	    "durationMilliseconds" : 38000,
	    "recordingUrl" : "https://cdn2.hubspot.net/hubfs/2676635/Temporary%20Files%20for%20Testing/Sample_Classical_WAV_File.wav",
	    "body" : "This is a test call with a WAV file as the recordingUrl."
	}
}

I think the issue may be that your recordingUrl is HTTP instead of HTTPS. Since HubSpot contact records are secure and use HTTPS, they will likely not play files hosted on an insecure HTTP protocol.

If you can enable SSL on that domain or upload the files to your HubSpot account's file manager with this API, your recordings should play.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
6 Replies 6
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Can not create engagement with type CALL for contacts

SOLVE

Hi, @khangnb.

Yes, WAV files are supported. I successfully created another engagement on this contact record with a WAV file and it plays.

I used the following body:

{
    "engagement": {
        "active": true,
        "ownerId": "",
        "type": "CALL",
        "timestamp": 1546871864663
    },
    "associations": {
        "contactIds": [2101],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
	"metadata" : {
	    "toNumber" : "1234567890",
	    "fromNumber" : "(987) 654-3210",
	    "status" : "COMPLETED",
	    "durationMilliseconds" : 38000,
	    "recordingUrl" : "https://cdn2.hubspot.net/hubfs/2676635/Temporary%20Files%20for%20Testing/Sample_Classical_WAV_File.wav",
	    "body" : "This is a test call with a WAV file as the recordingUrl."
	}
}

I think the issue may be that your recordingUrl is HTTP instead of HTTPS. Since HubSpot contact records are secure and use HTTPS, they will likely not play files hosted on an insecure HTTP protocol.

If you can enable SSL on that domain or upload the files to your HubSpot account's file manager with this API, your recordings should play.

Isaac Takushi

Associate Certification Manager
0 Upvotes
khangnb
Member

Can not create engagement with type CALL for contacts

SOLVE
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Can not create engagement with type CALL for contacts

SOLVE

Hi, @khangnb.

There may be an issue with the URL or the file you used.

I successfully created a CALL engagement on the same contact record with the call recording of a song:

{
    "engagement": {
        "active": true,
        "ownerId": "",
        "type": "CALL",
        "timestamp": 1546616332088
    },
    "associations": {
        "contactIds": [2101],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
	"metadata" : {
	    "toNumber" : "1234567890",
	    "fromNumber" : "(987) 654-3210",
	    "status" : "COMPLETED",
	    "durationMilliseconds" : 38000,
	    "recordingUrl" : "https://cdn2.hubspot.net/hubfs/2676635/Temporary%20Files%20for%20Testing/Naruto%20-%20Wind%20Trap%20Remix.mp3",
	    "body" : "This is a test call with a recording of this song: https://www.youtube.com/watch?v=7DNWHMqchBM."
	}
}

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Can not create engagement with type CALL for contacts

SOLVE

Welcome, @khangnb.

The users you tagged are not associated with HubSpot, so I deleted your second post.

There could be a number of things going on here. To troubleshoot effectively, I will need to know your Hub ID and the response you received from this endpoint.

Please share the entire error code and response.

Isaac Takushi

Associate Certification Manager
0 Upvotes
khangnb
Member

Can not create engagement with type CALL for contacts

SOLVE

I was created engagement with type CALL, but i can't set outcome? How can i set properties: outcome over api?

0 Upvotes
khangnb
Member

Can not create engagement with type CALL for contacts

SOLVE

I fixed outcome.
But when i set recordingUrl, it not play.
url: https://app.hubspot.com/contacts/5250579/contact/2101/?interaction=note

0 Upvotes