User Guide of Magento 2 WhatsApp Share Extension
General Configurations
At the backend, go to FME EXTENSIONS > Configurations. Here you can find the extension configurations.
- Enable Module: Select ‘Yes’ to enable the extension.
WhatsApp Functionality
This section allows you to enable the Whatsapp sharing functionality for all products and categories and set a custom default message for category share.
- Category Share: Select ‘Yes’ to enable WhatsApp share for categories.
- Enable on all Categories: Select ‘Yes’ to enable WhatsApp share for all categories. You can enable the functionality for individual categories from the category edit page.
- Product Share: Select ‘Yes’ to enable the Whatsapp share button for products.
- Enable on all Products: Select ‘Yes’ to enable the Whatsapp share option for all products. You can enable the option for individual products from the product edit page.
- Display Whatsapp logo on: Select ‘Both’ to display Whatsapp logo on both product and category pages.
- Allow Category to be shared: Select ‘Yes’ to allow category sharing.
- Category Custom Message: Write a custom message that you want to share with the category
- Display logo on: Choose a position to display the Whatsapp logo
URL Customization
This section allows you to enable the URL shortening feature.
- Enable Bitly URL: Select ‘Yes’ to enable the Bitly URL shortening feature
- API Token: Enter your Bitly API token. You will need to have a Bitly account and generate an access token.
Sharing Customization
This section allows you to set a custom default message and the product attributes to be sent to the contact you share the product with.
- Custom Message: Write a message that you want to share with the product.
- Select Attributes: Select the product attributes that you want to share.
- Attribute Separator: Enter placeholders for attribute label, attribute separator, next line, etc.
WhatsApp Logo Settings
- Size: Select the size of WhatsApp logo as small, medium or large.
- Image Field: Upload an image that you want to display as WhatsApp share
UTM Tracking Customization
- UTM Status: Select ‘Yes’ to enable UTM tracking.
- Source: Provide the ‘source’ parameter to identify the specific origin or referrer of the traffic. It answers the question: “Where did the traffic come from?”
- Medium: Provide the ‘medium’ parameter to identify the type or medium of the traffic source. It answers the question: “How did the traffic get here?”
- Name: Assign a ‘name’ parameter to identify the campaign.
GraphQL APIs
1. Get Product For WhatsApp
Description: This GraphQL query retrieves product details for a specific SKU. It returns the product's name, SKU, and a "getProductForWhatsapp" object that contains a link, image, and logo size for sharing the product via WhatsApp.
Query
{
products(filter: { sku: { eq: "24-MB04" } }) {
items {
getProductForWhatsapp {
link
image
logoSize
}
sku
name
}
}
}
Result
{
"data": {
"products": {
"items": [
{
"getProductForWhatsapp": {
"link": "https://web.whatsapp.com/send?text=http%3A%2F%2Fguest-to-customer.local%2Findex.php%2Fstrive-shoulder-pack.html%0A%0A%2ACheck+this+beautifull+Strive+Shoulder+Pack%2A%0A%2AProduct+Name%3A%2A+Strive+Shoulder+Pack%0A%2ASKU%3A%2A+24-MB04%0A%2APrice%3A%2A+32.000000",
"image": "http://guest-to-customer.local/media/path/to/image/directory/Screenshot_from_2025-02-26_14-30-55.png",
"logoSize": "40px"
},
"sku": "24-MB04",
"name": "Strive Shoulder Pack"
}
]
}
}
}
2. Get Category For WhatsApp
Description: The getCategoryForWhatsapp object provides the necessary details for sharing a product category on WhatsApp. It includes a link to the category page, allowing users to quickly navigate and view the full category when shared. The image represents the category visually, giving recipients a preview of what the category includes. Additionally, the logoSize ensures that the category's logo is displayed in the correct proportion, maintaining a neat and consistent appearance when shared. Together, these elements make it easy to share and promote product categories with relevant visuals on WhatsApp.
Query
{
category (
id: 21
) {
id
level
name
getCategoryForWhatsapp{
link
image
logoSize
}
}
}
Result
{
"data": {
"category": {
"id": 21,
"level": 3,
"name": "Tops",
"getCategoryForWhatsapp": {
"link": "https://web.whatsapp.com/send/?text=http%3A%2F%2Fguest-to-customer.local%2Findex.php%2Fwomen%2Ftops-women.html%0A%0ACheck+out+our+new+collection+of+%251Tops",
"image": "http://guest-to-customer.local/media/path/to/image/directory/Screenshot_from_2025-02-26_14-30-55.png",
"logoSize": "40px"
},
"breadcrumbs": [
{
"category_id": 20,
"category_name": "Women",
"category_level": 2,
"category_url_key": "women",
"category_url_path": "women"
}
]
}
}
}
3. Get Category For WhatsApp
Query
{
categoryList {
children_count
id
name
getCategoryForWhatsapp{
link
image
logoSize
}
children {
getCategoryForWhatsapp{
link
image
logoSize
}
uid
id
level
name
path
url_path
url_key
children {
uid
level
name
path
url_path
url_key
}
}
}
}
Result
{
"data": {
"categoryList": [
{
"children_count": "6",
"id": 2,
"name": "Default Category",
"getCategoryForWhatsapp": {
"link": "https://web.whatsapp.com/send/?text=http%3A%2F%2Fguest-to-customer.local%2Findex.php%2Fcatalog%2Fcategory%2Fview%2Fs%2Fdefault-category%2Fid%2F2%2F%0A%0ACheck+out+our+new+collection+of+%251Default+Category",
"image": "http://guest-to-customer.local/media/path/to/image/directory/Screenshot_from_2025-02-26_14-30-55.png",
"logoSize": "40px"
},
"children": [
{
"getCategoryForWhatsapp": {
"link": "https://web.whatsapp.com/send/?text=http%3A%2F%2Fguest-to-customer.local%2Findex.php%2Fwhat-is-new.html%0A%0ACheck+out+our+new+collection+of+%251What%27s+New",
"image": "http://guest-to-customer.local/media/path/to/image/directory/Screenshot_from_2025-02-26_14-30-55.png",
"logoSize": "40px"
},
"uid": "Mzg=",
"id": 38,
"level": 2,
"name": "What's New",
"path": "1/2/38",
"url_path": "what-is-new",
"url_key": "what-is-new",
"children": []
},
{
"getCategoryForWhatsapp": {
"link": "https://web.whatsapp.com/send/?text=http%3A%2F%2Fguest-to-customer.local%2Findex.php%2Fwomen.html%0A%0ACheck+out+our+new+collection+of+%251Women",
"image": "http://guest-to-customer.local/media/path/to/image/directory/Screenshot_from_2025-02-26_14-30-55.png",
"logoSize": "40px"
},
"uid": "MjA=",
"id": 20,
"level": 2,
"name": "Women",
"path": "1/2/20",
"url_path": "women",
"url_key": "women",
"children": [
{
"uid": "MjE=",
"level": 3,
"name": "Tops",
"path": "1/2/20/21",
"url_path": "women/tops-women",
"url_key": "tops-women"
},
{
"uid": "MjI=",
"level": 3,
"name": "Bottoms",
"path": "1/2/20/22",
"url_path": "women/bottoms-women",
"url_key": "bottoms-women"
}
]
},
{
"getCategoryForWhatsapp": {
"link": null,
"image": null,
"logoSize": null
},
"uid": "MTE=",
"id": 11,
"level": 2,
"name": "Men",
"path": "1/2/11",
"url_path": "men",
"url_key": "men",
"children": [
{
"uid": "MTI=",
"level": 3,
"name": "Tops",
"path": "1/2/11/12",
"url_path": "men/tops-men",
"url_key": "tops-men"
},
{
"uid": "MTM=",
"level": 3,
"name": "Bottoms",
"path": "1/2/11/13",
"url_path": "men/bottoms-men",
"url_key": "bottoms-men"
}
]
},
{
"getCategoryForWhatsapp": {
"link": null,
"image": null,
"logoSize": null
},
"uid": "Mw==",
"id": 3,
"level": 2,
"name": "Gear",
"path": "1/2/3",
"url_path": "gear",
"url_key": "gear",
"children": [
{
"uid": "NA==",
"level": 3,
"name": "Bags",
"path": "1/2/3/4",
"url_path": "gear/bags",
"url_key": "bags"
},
{
"uid": "NQ==",
"level": 3,
"name": "Fitness Equipment",
"path": "1/2/3/5",
"url_path": "gear/fitness-equipment",
"url_key": "fitness-equipment"
},
{
"uid": "Ng==",
"level": 3,
"name": "Watches",
"path": "1/2/3/6",
"url_path": "gear/watches",
"url_key": "watches"
}
]
},
{
"getCategoryForWhatsapp": {
"link": null,
"image": null,
"logoSize": null
},
"uid": "OQ==",
"id": 9,
"level": 2,
"name": "Training",
"path": "1/2/9",
"url_path": "training",
"url_key": "training",
"children": [
{
"uid": "MTA=",
"level": 3,
"name": "Video Download",
"path": "1/2/9/10",
"url_path": "training/training-video",
"url_key": "training-video"
}
]
},
{
"getCategoryForWhatsapp": {
"link": null,
"image": null,
"logoSize": null
},
"uid": "Mzc=",
"id": 37,
"level": 2,
"name": "Sale",
"path": "1/2/37",
"url_path": "sale",
"url_key": "sale",
"children": []
}
]
}
]
}
}