PHP Point of Sale - Call Journaling issue

Status
Not open for further replies.

pmterp

Gold Partner
Joined
Jun 13, 2017
Messages
424
Reaction score
256
I started with a template generated from the 3CX CRM wizard but have made a couple of modifications to get the authentication right. Now inbound calls are matching and poping up the customer URL as desired.
My issue is that I'm trying to write to the "comments" field to journal the call but it isn't working.
I looked at the SystemService log and can see that the URL for the POST request is missing the ContactID...
Code:
2022/12/27 14:17:44.896|9845|0036|Verb|CRM: Performing POST request to 'https://demo.phppointofsale.com/index.php/customers/' with message '{"comments":"Phone Call 12/27/2022 2:17 PM by Group1 Receptionist for 00:28"}'.
In my template the URL ends with [ContactID]...
Code:
Url="https://demo.phppointofsale.com/index.php/customers/[ContactID]"
I think it may have to do with not having the variable or returned output available in the ReportCall scenario but I'm not really sure how to correct that.
I've attached the template and any assistance is appreciated.
 

Attachments

  • Like
Reactions: TheodorosG_3CX
You need to use the output of EntityId and EntityType, not the variables.

See here: https://www.3cx.com/docs/server-side-crm-template-xml-description/#h.vcivldjsa1lz
Thank you much. Using the EntityID resolved that for me.
Is there any way to use a variable in the Post request? The issue I'm dealing with now is the PoS/CRM doesn't have a "call log" area. However, when I make the Post request, it updates (over rights) that field instead of appending the content.
I've got the Get request pulling the existing comments but I can't figure out a way to place them in front of the new content in the Post request.
 
Thank you much. Using the EntityID resolved that for me.
Is there any way to use a variable in the Post request? The issue I'm dealing with now is the PoS/CRM doesn't have a "call log" area. However, when I make the Post request, it updates (over rights) that field instead of appending the content.
I've got the Get request pulling the existing comments but I can't figure out a way to place them in front of the new content in the Post request.
You can chain scenarios and the second one will have access to variables from the first one. Then you can do your [OldContent]+[NewContent] in the PostValues of your second scenario.
 
Status
Not open for further replies.

Forum statistics

Threads
112,291
Messages
591,733
Members
165,416
Latest member
Graham Robertson