on 2021 Mar 26 12:41 PM
Hi,
I am trying to filter contact using mobile number.
MobileNumber = '+911199334455'.
When i query odata with $filter=MobileNumber eq '+911199334455' it doesnt gave any result but response is 200.
Any idea on this?
Regards,
Bhaskar
Request clarification before answering.
Hi,
It is due to the URL encoding behavior of the HTTP request and to resolve this issue you can simply replace '+' with '%2B' in your request url.
For e.g.: https://<Host:Port>/sap/opu/odata/sap/API_MKT_CONTACT_SRV;v=4/Contacts?$top=1&$filter=PhoneNumber eq '%2B491234432111'
This request will give you the first contact that matches phone number +491234432111.
Hope this helps!
Thanks
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhaskar,
one question: Why don't you use API_MKT_CONTACT_SRV instead of your Custom View? Or do you need the contact details specifically in combination with your campaign?
I tried using that one but have the same problem using the Phone Number starting with '+'. So that seems to be the problem.
But as a workaround you could also use the phone number without the '+' if you change the $filter parameter a little bit and use "endswith". So, using the API_MKT_CONTACT_SRV the request has to look like that:
https://myxxxxxx-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_CONTACT_SRV/Contacts?$top=1&;$filter=endswith(PhoneNumber,'919999099999')
Maybe you can also try that for your Custom CDS View.
Kind Regards
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello bhaskar.idp,
Additional to Saravana's answer, I see you've created a custom CDS View and using the filter criteria CampaignId and InteractionContactId, It should work if the data which you're looking for really does exist in system.
Please check back once or share more screenshots to help you.
Thank you.
Best Regards,
Kunal Bansal, SAP Marketing Consultant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhaskar,
As per my understanding , getting a 200 response has nothing to do with getting a result, because not returning any entry is still a valid result , so can you check if you can find any entries actually available for this filter criteria in the system .
Regards,
Saravana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.