Using a short phone number as CTA

Hi Community,
I am trying to find a solution for an Experience and need help.

Context
Quite many countries in EMEA are using “short phone numbers” (4 digits) instead of normal 10/12 digits phone numbers.
These short phone numbers are not accepted (yet ?) in the Knowledge Graph as “Main Phone”, so quite many clients want to store those short numbers in custom fields to be able to use them at least for Pages.

Issue
My client asked for adding a 3rd CTA in the locations vertical to be able to use the label “Call now” and a link to call the short phone number. Here is a quick photomontage to show the expected result:

And here is the Search Page URL: https://answers-embed.afpa.com.pagescdn.com/ and the platform/site related: https://www.yext.com/s/3409299/sites/17049/features/)

It seems that using a custom field instead of a “normal” phone number as a phone CTA doesn’t work in this configuration. I tried to use a number custom field, a CTA custom field, but it doesn’t seems to be accepted (or maybe I messed up with the code editor).

Would there be a workaround that would allow to use “any” phone number (=short number here) in a CTA ?

Thanks in advance if you have any idea about that.

Best,
Nicolas

Hey,

I would add an additional comment about this problem.

The #1 objective here is having this CTA button displayed in the results.
An acceptable degraded solution would be having this CTA displayed with the short 4 digits phone number even if the click doesn’t work.

Thanks for your help.

Hey @Nicolas_S,

It looks like you’re very close to your desired result.

In the phoneLink Formatter which generates the link in your CTA you’ll just need to specify which field to reference, i.e. the custom field that stores the short number:

url: Formatter.phoneLink(profile, '[c_xyz]'),

Best,
Max

Huge thanks @Max_Wolter !!!

So that was just a matter of syntax, not a problem with how we are “hosting” the phone number and how we call it.
Never seen/used this syntax url: Formatter.phoneLink(profile, '[c_xyz]') , I had used url: Formatter.phoneLink(profile.c_xyz) , url: Formatter.phoneLink(c_xyz) and others. So much time wasted :confused:

Thanks a lot for your help!