WhatsApp
Send Address Message
17 min
note this feature is only available for businesses based in singapore and their singapore customers, and businesses based in india and their india customers address message is an interactive messages that can be sent to collect the address from the customers by the whatsapp businesess it give your users a simpler way to share the shipping address with the business on whatsapp its is free form message with a cta button which will open a form with a pre defined personal details and address fields it contains 4 main parts header, body, footer, and action inside the action component, the business specifies the name “address message” and relevant parameters user journey let us try to understand and see how does the address message looks like with a demonstration address message whatsapp address message steps the steps involved in an address message are the following business sends an address message with the action name address message to the user user interacts with the message by clicking on the cta, which brings up an address message screen the user fills out their address and submits the form after the address message form is submitted by the user, the partner receives a webhook notification, which contains the details of the address submitted by the user sample india address message the following sequence diagram shows a typical integration flow for an address message additional action parameters the business can pass additional attributes such as values, validation errors, or saved addresses as part of the interactive action parameters you can find information on each of their uses below values businesses prefill this for address fields (eg prefilling the city address field with “singapore”) to send an address message without any saved addresses, whatsapp will prompt the user or business with an address form to enter a new address saved addresses for businesses, they can pass in saved addresses previously associated with the user for users, they are presented with the option to choose the saved address instead of manually filling it in to send an address message with saved addresses, whatsapp will prompt the user or business with an option to select among the saved addresses or add an address option users can ignore the saved address and enter a new address validation errors businesses can throw errors in the address fields and whatsapp will prevent the user from submitting the address until the issue(s) are/is resolved an address message should be re sent to the user in the case of a validation error on the business server the business should send back the set of values previously entered by the user, along with the respective validation errors for each invalid field, as shown in the sample payloads below error handling if the area code of the phone number for the given country is not correct, businesses will be unable to request the address message from the recipient for example, businesses will be unable to request an address message from a recipient that has the country as “singapore” but has a phone number with an area code of "91" address messages will not allow simultaneous passing of conflicting fields for example, you cannot pass in sg post code when the country is set to “in” once the address message is sent, the business waits for the user to fill in the address and send it back the user entered address is shared through the webhook registered in the setup process supported fields in country the table below outlines which fields are supported in which country specifically field name display label input type supported countries limitations name name text india, singapore none phone number phone number tel india, singapore valid phone numbers only in pin code pin code text india max length 6 sg post code post code number singapore max length 6 house number flat/house number text india none floor number floor number text india none tower number tower number text india none building name building/apartment name text india none address address text india, singapore none landmark area landmark/area text india none unit number unit number text singapore none city city text india, singapore none state state text india none additional action parameters the business can pass additional attributes such as values, validation errors, or saved addresses as part of the interactive action parameters you can find information on each of their usage below action parameter usage values businesses prefill this for address fields (eg prefilling the city address field with “singapore”) saved addresses for businesses, they can pass in saved addresses previously associated with the user for users, they are presented with the option to choose the saved address instead of manually filling it in validation errors businesses can throw errors in the address fields and whatsapp will prevent the user from submitting the address until the issue(s) are/is resolved send an address messages make a post call to https //{{authkey}} {{authtoken}}@{{subdomain}}/v2/accounts/{{accountsid}}/messages using the whatsapp api to send an end to end encrypted address message to the user to send an address message without any saved addresses , whatsapp will prompt the user or business with an address form to enter a new address { "custom data" "custom data", "status callback" "status callback url", "client id" "client id", "whatsapp" { "messages" \[ { "from" "9180xxxxxxxx", "to" "9198xxxxxxxx", "content" { "type" "interactive", "interactive" { "type" "address message", "body" { "text" "thanks for your order! tell us what address you’d like this order delivered to " }, "action" { "name" "address message", "parameters" { "country" "in" } } } } } ] } } check your response a successful response includes a messages object with a sid for the newly created message { "request id" "d46ba32ad89646xxxx", "method" "post", "http code" 202, "metadata" { "failed" 0, "total" 1, "success" 1 }, "response" { "whatsapp" { "messages" \[ { "code" 202, "error data" null, "status" "success", "data" { "sid" "720exxxxxxx", "client sid" "xxxx" } } ] } } } send a pre filled address message to send an address message with a pre filled address and without any saved addresses , whatsapp will prompt the user or business with an address form to enter a new address india { "custom data" "custom data", "status callback" "status callback url", "client id" "client id", "whatsapp" { "messages" \[ { "from" "9180xxxxxxxx", "to" "9198xxxxxxxx", "content" { "type" "interactive", "interactive" { "type" "address message", "body" { "text" "thanks for your order! tell us what address you’d like this order delivered to " }, "action" { "name" "address message", "parameters" { "country" "in", "values" { "name" "customer name", "phone number" "+9198xxxxxxxx" } } } } } } ] } } send a saved address message to send an address message with saved addresses , whatsapp will prompt the user or business with an option to select among the saved addresses or add an address option users can ignore the saved address and enter a new address { "custom data" "custom data", "status callback" "status callback url", "client id" "client id", "whatsapp" { "messages" \[ { "from" "9180xxxxxxxx", "to" "9198xxxxxxxx", "content" { "type" "interactive", "interactive" { "type" "address message", "body" { "text" "thanks for your order! tell us what address you’d like this order delivered to " }, "action" { "name" "address message", "parameters" { "country" "in", "saved addresses" \[ { "id" "address1", "value" { "name" "customer name", "phone number" "+91xxxxxxxxxx", "in pin code" "400101", "floor number" "5", "building name" "", "address" "wing f2, ramada tower, 90ft road", "landmark area" "andheri east", "city" "mumbai" } } ] } } } } } ] } } send an address message with validation errors an address message should be re sent to the user in the case of a validation error on the business server the business should send back the set of values previously entered by the user, along with the respective validation errors for each invalid field, as shown in the sample payloads below india { "custom data" "custom data", "status callback" "status callback url", "client id" "client id", "whatsapp" { "messages" \[ { "from" "9180xxxxxxxx", "to" "9198xxxxxxxx", "content" { "type" "interactive", "interactive" { "type" "address message", "body" { "text" "thanks for your order! tell us what address you’d like this order delivered to " }, "action" { "name" "address message", "parameters" { "country" "in", "values" { "name" "customer name", "phone number" "+91xxxxxxxxxx", "in pin code" "666666", "address" "some other location", "city" "delhi" }, "validation errors" { "in pin code" "we could not locate this pin code " } } } } } } ] } } receive callback notifications for address submissions businesses will receive address submission notifications through webhooks, such as the one shown below default & pre filled address message callbacks { "whatsapp" { "messages" \[ { "callback type" "incoming message", "sid" "eff9590c15fxxxxx", "from" "+9198xxxxxxxx", "to" "+9180xxxxxxxx", "timestamp" "2024 04 08t11 19 31+05 30", "profile name" "xxx", "content" { "type" "interactive", "context" { "sid" "c0edd0b1b66cexxxxxxx" }, "interactive" { "type" "nfm reply", "nfm reply" { "body" "abhxx \n9878xxxxxx\n560xx, 2x above dishware , some landmark , 201, 2, 1, adishwar, bangalore , karnataka ", "name" "address message", "response json" "{\\"values\\" {\\"in pin code\\" \\"560xx\\",\\"building name\\" \\"adishwar\\",\\"landmark area\\" \\"some landmark \\",\\"address\\" \\"2x above dishware \\",\\"tower number\\" \\"1\\",\\"city\\" \\"bangalore \\",\\"name\\" \\"abhxx \\",\\"phone number\\" \\"98xxxxxxxx\\",\\"house number\\" \\"2xx\\",\\"floor number\\" \\"2\\",\\"state\\" \\"karnataka \\"}}" } } } } ] } } saved address message callbacks { "whatsapp" { "messages" \[ { "callback type" "incoming message", "sid" "0315dea17bxxxx", "from" "+9198xxxxxxxx", "to" "+9180xxxxxxxx", "timestamp" "2024 04 08t12 15 52+05 30", "profile name" "abhxx", "content" { "type" "interactive", "context" { "sid" "feebe4823fxxxxx" }, "interactive" { "type" "nfm reply", "nfm reply" { "body" "customer name\n+91xxxxxxxxxx\n400063, wing f, ramada tower, 90ft road, andheri east, mumbai, 8", "name" "address message", "response json" "{\\"saved address id\\" \\"address1\\",\\"values\\" {\\"in pin code\\" \\"400063\\",\\"landmark area\\" \\"andheri\\",\\"address\\" \\"wing f, ramada tower, 90ft road\\",\\"city\\" \\"mumbai\\",\\"name\\" \\"customer name\\",\\"floor number\\" \\"8\\",\\"phone number\\" \\"+91xxxxxxxxxx\\"}}" } } } } ] } } in the case where the client does not support address message, messages are silently dropped and an error message is sent back to the business in a webhook the webhook notification that would be sent back is shown below copy { "statuses" \[ { "errors" \[ { "code" 1026, "href" "https //developers facebook com/docs/whatsapp/api/errors/", "title" "receiver incapable" } ], "id" "gbggflawcwfvagkyhmgknru4jea", "message" { "recipient id" "+91xxxxxxxxxx" }, "recipient id" "91xxxxxxxxxx", "status" "failed", "timestamp" "1670394125", "type" "message" } ] }
🤔
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.