CB autoaction request : get url with same keys fail

2 months 6 days ago #330899 by activha
Hello
I just noticed that when using a CB autoaction request get url with keys having the same name, only the last one is used.
For instance if I set 
Get url https://xxxxx
Key :  key
Value : xxxxx

Key : contact_level_code
Value : MANDATAIRE

key : contact_level_code
Value : DIRIGEANT
`

Only the last key with the value DIRIGEANT is used
This behavior occurs whatever the number of keys with the same name.

Could you check on your side and maybe change as we need to sort with several keys having the same name but different values from the API used ?

for instance : contact_level_code=DIRECTEUR&contact_level_code=RESPONSABLE&contact_level_code=MANDATAIRE

Thanks a lot

Please Log in to join the conversation.

2 months 6 days ago #330906 by krileon
That's working as expected. You of course can't set multiple same key names in request data. You need to use unique keys.

Could you check on your side and maybe change as we need to sort with several keys having the same name but different values from the API used ?

You can use substitutions in the Value parameter. Use IF substitutions to condition what value you send as it sounds like you need to conditionally send a different value based off some sort of criteria.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

2 months 6 days ago #330908 by activha

You of course can't set multiple same key names in request data

That's exactly the point, we use an API where we need to set several keys with the same name 
see societeinfo.com/api-doc/#search-contacts at Contact Url parameters

Please Log in to join the conversation.

2 months 6 days ago - 2 months 6 days ago #330911 by krileon
You're needing to send an array of data then. It does not support that. Will implement support for that shortly.

forge.joomlapolis.com/issues/9034


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: activha

Please Log in to join the conversation.

2 months 6 days ago #330913 by krileon
Ok, a new build release of CB Auto Actions is now available. The request action will now convert same key name body and head data to arrays. Have also added support for PUT, PATCH, and DELETE methods to cover modern API endpoint usages.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: activha

Please Log in to join the conversation.

2 months 5 days ago #330944 by activha
Just a quick question : when you convert same key to arrays, is that a AND or a OR condition ?

We need contact_level_code=DIRECTEUR&contact_level_code=RESPONSABLE&contact_level_code=MANDATAIRE but am not sure it is not OR instead of &

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.217 seconds

Facebook Twitter LinkedIn