CRM call journalling not working

david.taylor

Gold Partner
Advanced Certified
Joined
Jan 25, 2022
Messages
22
Reaction score
11
I've created a template for Streets. The contact lookup works but I can't get the call journalling working.

Here's what I have for the 'ReportCall' scenario.

XML:
        <Scenario Id="ReportCall" Type="REST" EntityId="" EntityOrder="">
            <Request SkipIf="[ReportCallEnabled]!=True||[EntityId]==&quot;&quot;" Url="https://street.co.uk/open-api/v1/notes" MessagePasses="0" Message="" RequestContentType="application/vnd.api+json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
                <Headers>
                    <Value Key="Authorization" If="" SkipIf="" Passes="0" Type="String">Bearer [APIKey]</Value>
                    <Value Key="Accept" If="" SkipIf="" Passes="0" Type="String">application/vnd.api+json</Value>
                    <Value Key="User-Agent" If="" SkipIf="" Passes="0" Type="String">3CX</Value>
                </Headers>
                <PostValues Key="">
                    <Object Key="data">
                        <Value Key="type" Passes="1" Type="String">note</Value>
                        <Object Key="attributes">
                            <Value Key="body" If="[CallType]==Inbound" SkipIf="" Passes="2" Type="String">[[InboundCallText]]</Value>
                            <Value Key="body" If="[CallType]==Missed" SkipIf="" Passes="2" Type="String">[[MissedCallText]]</Value>
                            <Value Key="body" If="[CallType]==Outbound" SkipIf="" Passes="2" Type="String">[[OutboundCallText]]</Value>
                            <Value Key="body" If="[CallType]==Notanswered" SkipIf="" Passes="2" Type="String">[[NotAnsweredOutboundCallText]]</Value>
                        </Object>
                        <Object Key="relationships">
                            <Object Key="person">
                                <Object Key="data">
                                    <Value Key="type" Passes="1" Type="String">person</Value>
                                    <Value Key="id" Passes="1" Type="String">[EntityId]</Value>
                                </Object>
                            </Object>
                        </Object>
                    </Object>
                </PostValues>
            </Request>
            <Variables />
            <Outputs Next="" AllowEmpty="false" />
        </Scenario>

In 3cxSystemService.log I can see the following error when this is triggered.

Code:
2026/04/15 15:13:09.754|0053|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'ReportCall'.
2026/04/15 15:13:09.754|0053|Debg| [Integration.Crm.Engine.NoAuthHttpClientProvider] CRM: Creating new HttpClient with no authentication
2026/04/15 15:13:09.754|0053|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Performing POST request to 'https://street.co.uk' with message '********'.
2026/04/15 15:13:09.754|0053|Info| [_3CX.HttpClient] Sending 'POST/1.1' to 'https://street.co.uk/open-api/v1/notes'
2026/04/15 15:13:09.913|0053|Info| [_3CX.HttpClient] Received '415 UnsupportedMediaType' after 158.4ms
2026/04/15 15:13:09.914|0053|Erro| [Integration.Crm.Engine.CrmProcessor] CRM: Exception during call reporting
System.Exception: Server returned a non successful status code - HTTPStatusCode=UnsupportedMediaType - Reason=Unsupported Media Type - Content={"errors":[{"status":"415","code":"1","title":"unsupported_media_type_http_exception","detail":"Unsupported Media Type","source":{"pointer":""}}]}
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessRequest(Boolean authScenario, ScenarioRequest request, IValueManager customManager, HttpClient client, Boolean retry, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, List`1 stack, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.Execute(ProtocolScenario scenario, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioByName(String scenarioName, IEnumerable`1 parameters, Boolean useNoAuthProvider, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioWithRetries(String scenarioId, Dictionary`2 parameters, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ReportCall(CallEndedEvent callEndedEvent, CancellationToken token)

I can't see anywhere the JSON string that is built for the request. Having visibility of this would assist me greatly but it doesn't seem to be output to the log.

It works fine when I build it manually using Fiddler.

The API for note creation is documented here: https://developers.street.co.uk/docs/street-open-api/api-reference/tag/notes/post/notes

Can anyone help please? TIA.
 
@david.taylor
the request is to https://street.co.uk/open-api/v1/notes
<Request SkipIf="[ReportCallEnabled]!=True||[EntityId]==&quot;&quot;" Url="https://street.co.uk/open-api/v1/notes" MessagePasses="0" Message="" RequestContentType="application/vnd.api+json"
RequestEncoding="Json" RequestType="Post" ResponseType="Json">


When the PBX sends this, the response is with " 415 UnsupportedMediaType' :


2026/04/15 15:13:09.754|0053|Info| [_3CX.HttpClient] Sending 'POST/1.1' to 'https://street.co.uk/open-api/v1/notes'
2026/04/15 15:13:09.913|0053|Info| [_3CX.HttpClient] Received '415 UnsupportedMediaType' after 158.4ms


I think you have to check on the CRM side to see what the logs tell you there and for what reason the response is like this.
 
@david.taylor
the request is to https://street.co.uk/open-api/v1/notes
<Request SkipIf="[ReportCallEnabled]!=True||[EntityId]==&quot;&quot;" Url="https://street.co.uk/open-api/v1/notes" MessagePasses="0" Message="" RequestContentType="application/vnd.api+json"
RequestEncoding="Json" RequestType="Post" ResponseType="Json">


When the PBX sends this, the response is with " 415 UnsupportedMediaType' :


2026/04/15 15:13:09.754|0053|Info| [_3CX.HttpClient] Sending 'POST/1.1' to 'https://street.co.uk/open-api/v1/notes'
2026/04/15 15:13:09.913|0053|Info| [_3CX.HttpClient] Received '415 UnsupportedMediaType' after 158.4ms


I think you have to check on the CRM side to see what the logs tell you there and for what reason the response is like this.
Yes, this much I have worked out. 415 means there's an issue with the JSON string sent in the request, but as I said, I can't see the JSON string that 3CX builds using the <PostValues> tag in the template. I am also asking Street if they have any logs that will assist but in the meantime if anyone here can help, it would be appreciated.
 
Contact me. We have a premade template for Street and we have a workaround for the call journaling issue.
 
@david.taylor
the request is to https://street.co.uk/open-api/v1/notes
<Request SkipIf="[ReportCallEnabled]!=True||[EntityId]==&quot;&quot;" Url="https://street.co.uk/open-api/v1/notes" MessagePasses="0" Message="" RequestContentType="application/vnd.api+json"
RequestEncoding="Json" RequestType="Post" ResponseType="Json">


When the PBX sends this, the response is with " 415 UnsupportedMediaType' :


2026/04/15 15:13:09.754|0053|Info| [_3CX.HttpClient] Sending 'POST/1.1' to 'https://street.co.uk/open-api/v1/notes'
2026/04/15 15:13:09.913|0053|Info| [_3CX.HttpClient] Received '415 UnsupportedMediaType' after 158.4ms


I think you have to check on the CRM side to see what the logs tell you there and for what reason the response is like this.
From our testing, setting the RequestContentType attribute does nothing. When the RequestEncoding is set to Json, it forces the "application/json" type, instead of taking the custom one, like "application/vnd.api+json". We did a lot of testing during the development of that integration.
 
From our testing, setting the RequestContentType attribute does nothing. When the RequestEncoding is set to Json, it forces the "application/json" type, instead of taking the custom one, like "application/vnd.api+json". We did a lot of testing during the development of that integration.
That makes sense.

So would it work to add the below to the header section?

XML:
                    <Value Key="Content-Type" If="" SkipIf="" Passes="0" Type="String">application/vnd.api+json</Value>
 
That makes sense.

So would it work to add the below to the header section?

XML:
                    <Value Key="Content-Type" If="" SkipIf="" Passes="0" Type="String">application/vnd.api+json</Value>
It seems this doesn't work.

@NikosT_3CX Please can we get this fixed so that it sets the correct Content-Type per the RequestContentType attribute. See post above from ConceptsWeb.
 
To bypass this issue you will need to use the Message attribute instead of specifying the <PostValues> element. In the Message attribute you need to build your JSON.
 
To bypass this issue you will need to use the Message attribute instead of specifying the <PostValues> element. In the Message attribute you need to build your JSON.
Doesn't help. We tried that. The issue is the content type header, not the body.
 
Doesn't help. We tried that. The issue is the content type header, not the body.
Just mentioned it because I remember that the Content Type header was automatically set to "application/json" when using PostValues and the format is JSON.
 
  • Like
Reactions: Evolute IT