Custom Variables

chani

Platinum Partner
Joined
Jul 10, 2024
Messages
9
Reaction score
2
Hello, I have been having a little trouble with storing and using custom variables.

In the phone and email lookup scenarios, I want to store a custom variable called FacilityCode that will be used for the URL for the ReportCall and ReportChat scenarios. The issue here is that the FacilityCode is blank when I try to use it in the ReportCall/Chat scenario.

I have tested the phone search and it does seem to be setting the FacilityCode variable.
1727133594904.png

However, I check the logs and the API endpoint is blank where the FacilityCode should be:
1727133920739.png

I am storing the FacilityCode in the default and LookupByEmail scenario like this
1727135454844.png

And then using the FacilityCode in the ReportCall and ReportChat scenarios like so:
1727135568533.png


Any help or advice would be highly appreciated! :)
 

Attachments

  • 1727134035178.png
    1727134035178.png
    68.1 KB · Views: 2
The variables that you are setting during contact lookup scenario are not passed to the call journaling scenario. The only outputs that are passed are the EntityId and EntityType. Those outputs are not used by 3CX internally, they are just passed on. So you could use them as placeholders for this. For example, if you don't need the EntityType because you only deal with contacts, then an easy way is using it for the facility that you need. Otherwise, if you are using both EntityId and EntityType, you will need to encode somehow your values into one of those outputs. For example, you could use the EntityType and add a comma separator. Then in your call journaling scenario you can split the value and get the part you need.
 
The variables that you are setting during contact lookup scenario are not passed to the call journaling scenario. The only outputs that are passed are the EntityId and EntityType. Those outputs are not used by 3CX internally, they are just passed on. So you could use them as placeholders for this. For example, if you don't need the EntityType because you only deal with contacts, then an easy way is using it for the facility that you need. Otherwise, if you are using both EntityId and EntityType, you will need to encode somehow your values into one of those outputs. For example, you could use the EntityType and add a comma separator. Then in your call journaling scenario you can split the value and get the part you need.
Is [CustomValue] still a thing?
 
Is [CustomValue] still a thing?
No, this is something that you can use inside a chain of scenarios, but it's not passed on as it was in previous versions. This has been removed long time ago.
 
The variables that you are setting during contact lookup scenario are not passed to the call journaling scenario. The only outputs that are passed are the EntityId and EntityType. Those outputs are not used by 3CX internally, they are just passed on. So you could use them as placeholders for this. For example, if you don't need the EntityType because you only deal with contacts, then an easy way is using it for the facility that you need. Otherwise, if you are using both EntityId and EntityType, you will need to encode somehow your values into one of those outputs. For example, you could use the EntityType and add a comma separator. Then in your call journaling scenario you can split the value and get the part you need.
I see, thank you! I just assumed the CustomValue was useable since it was in the template generator. I'll try out your solution - thank you again!
 
  • Like
Reactions: Evolute IT
I see, thank you! I just assumed the CustomValue was useable since it was in the template generator. I'll try out your solution - thank you again!
Yes, it actually has a valid use case, and that's when you use it inside 2 chained scenarios. You can pass data from one scenario to the next. This is why it is still in the tool. You just must not use it between 2 different triggers, i.e. contact lookup and call journaling.