Session.ani

Status
Not open for further replies.

JorgeWillianSantos

Bronze Partner
Advanced Certified
Joined
Dec 19, 2023
Messages
38
Reaction score
7
Hello, I'm performing an integration with a messaging service that we use, what the integration needs to do is that if desired by the customer the conversation continues by whatsapp, at the moment everything is working until sending a message to the calling number that I'm having difficulty automating, I know that the variable session.ani catches the number calling, But how should I use this variable? I tried adding it directly in the JSON code but that way the variable is not recognized.
 
Use the Expression Editor to build an expression that concatenates static text with variables.
 
  • Like
Reactions: Evolute IT
I've done the concatenation but it's still not picking up the calling number, is there anything else to do here so that it recognizes the variable?
WhatsApp Image 2024-03-04 at 11.44.15.jpeg
 
Like that you're adding the number before the JSON, that will break the JSON. You need to put it somewhere in the middle.
 
you mean putting in the JSON itself?
 
you mean putting in the JSON itself?
You need to concatenate that variable into the JSON, not before the JSON. So your CONCATENATE function should be something like:
CONCATENATE("{ \"platform_id\": ", session.ani, "}")

I'm oversimplifying this of course, just so you understand what you need to do. The variable needs to be added in the part of the JSON that requires it.
 
  • Like
Reactions: Evolute IT
When I put the concatenate i get the following error.
 

Attachments

  • WhatsApp Image 2024-03-06 at 10.31.58.jpeg
    WhatsApp Image 2024-03-06 at 10.31.58.jpeg
    78.1 KB · Views: 26
You're putting it inside the static text. You need to concatenate static text and variables.
 
Done, I put the variable in the middle and it worked, thank you so much for the help!
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,893
Messages
589,598
Members
164,763
Latest member
Techmansam