Solved First check for result on scenario 1, then check for result on scenario 2

Status
Not open for further replies.

larsg23

Customer
Joined
Sep 4, 2023
Messages
5
Reaction score
1
Hi,

I want to configure the following:
  1. Check in the persons table based on the calling number if there is a match > if there is a match then return the result and do not run the next scenario
  2. If there is no result then check in the companies table based on the calling phone number if there is a match and return that result
I have managed to get both seperatly working, but when i set allow empty on true and set scenario 2 as the next one in scenario 1 things stop working. The result i get:
  1. If i test with a valid phone number that exists in the companies table everything is working fine, the first scenario gives no result, the second runs and i have result in the output tab
  2. If i test with a valid phone number that exists in the persons table i do get a result in the Request/response, in the Response tree and Variables tab, but the Output tab in but scenarios remains empty. When i upload the XML and test it i get the message "CRM Integration is working OK but contact number does not exist. Check log for more info or try a different number."
I have attached my XML file.

So if i don't link the scenarios and test a valid phone number in the persons table i get a valid result, the same goes for the companies table. Things only go wrong when i start linking.

Please help.

Thank you in advance.

Kind regards,
Lars
 

Attachments

For contact lookup scenarios, you can leave all of them with an empty Id, and that will cause that all of them are launched during contact lookup. You can skip some scenario using the FoundRecordCount variable. Many of our standard integrations use this approach, for example check SalesforceV2.xml:
XML:
<Request SkipIf="[IIf([FoundRecordCount]&gt;0,True,False)]"  ..... />
 
  • Like
Reactions: Evolute IT
Sound logical, so i have tried it but nothing changes. I have added the skipif first to only the second scenario, after that i also tried to add it to both but the behavior remains the same. When i look for a number that has no result in the first scenario, but has a result in the second one i get an output. When i look for a number that has a result in the first one i do get result in the first 3 tabs but the last (output) tab remains empty. I have also tried to rename my Entityid and orders from numbers to text because i have noticed that you also do that in your standards, but that also doesn't help. I have compared my XML with the Salesforce XML, but i can't find any differences that point me to the cause of my problem.

I have added the updated XML, hope you can help.
 

Attachments

You need to make 2 changes:
1. Remove Next="Tel werk lookup" from the Outputs element in your first scenario.
2. Remove Id="Tel werk lookup" from the Scenario element in your second scenario.
 
  • Like
Reactions: Evolute IT
Ah, now i understand how this works! That did the trick, muchos gracias!
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,882
Members
165,468
Latest member
kanderson