CRM intergation

Status
Not open for further replies.

ITUnfallen

Customer
Joined
Jun 24, 2021
Messages
6
Reaction score
1
Hi Forum
Please help me, i try to fix intergration with. amocrm

So, i added a json to add info about incoming \ outgoing call with duration and lnk to download recorging according this apiv2
Снимок экрана 2021-11-08 в 20.37.37.png

Code:
{"UNIQ":"[CallDirection]_[Agent]_[[CallStartTimeLocal].ToString("yyyyMMddHHmmss")]","LINK":"https://SOME_URL/audiofile/?GETFILE=[Agent]_[[CallStartTimeLocal].ToString("yyyyMMddHHmmss")]","PHONE":"none","DURATION":"[[[DurationTimespan].get_TotalSeconds()].ToString("F0")]","SRC":"3cx"}

But in logs, i. see that in request, some quotes are missed (after LINK and BEFORE DURATION)

2021/11/08 20:34:24.148|24146|0014|Verb|Performing POST request to 'https://v/private/api/v2/json/notes/set?USER_LOGIN=LOGIN_HERE&USER_HASH=HASH_HERE' with message '{"request":{"notes":{"add":[{"element_id":"58261803","element_type":"1","note_type":"11","text":"{\"UNIQ\":\"Outbound_100_20211108203403\",\"LINK\":\"https://SOME_URL/audiofile/?GETFILE=100_20211108203403,\"PHONE\":\"none\",\"DURATION\":21\",\"SRC\":\"3cx\"}"}]}}}'.

why 3cx cut some quotes? and may be anybody knows how i can fix it
 
  • Like
Reactions: Evolute IT
Hmm,
You advice to try to replace quotes with ^^ ?
 
  • Like
Reactions: Evolute IT
Changed to and nothing changed ((

Code:
{^^UNIQ^^:^^{{CallDirection}}_{{Number}}_{{Agent}}_{{{{CallStartTimeLocal}}.ToString("yyyyMMddHHmmss")}}^^,^^LINK^^:^^https://SOME_URL/audiofile/?GETFILE={{Number}}_{{Agent}}_{{{{CallStartTimeLocal}}.ToString("yyyyMMddHHmmss")}}^^,^^PHONE^^:^^{{Number}}^^,^^DURATION^^:^^{{{{{{DurationTimespan}}.get_TotalSeconds()}}.ToString("F0")}}^^,^^SRC^^:^^3cx^^}
 
Last edited:
Variables should remain between brackets. For example, you changed [CallDirection] to {{CallDirection}}, but for variables you should keep the brackets so it is interpreted as a variable and the actual value is put there.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei