The specified version of the app (0.x.0) does not exist. This page is about the latest stable version, which is 1.0.5.
Offer your clients to record a greeting in the sales for gift.
Configuration
- Install StoryDots - QR Virtual Greeting from the AppStore or, if using VTEX CLI, login to the desired VTEX account and run the following command:
_10vtex install storydotspartnerar.storydots-virtual-greeting@1.x
- If you installed the App from VTEX AppStore, you will be prompted with the following Settings screen. Fill and submit the required data so the App can create a new account linked to your store. If you installed the App via terminal using VTEX CLI, you can access this same Settings screen going to your store's Admin > Apps > App management > Installed > Storydots | QR Gift Virtual Greeting.
- Add storydots-virtual-greeting app to your theme's dependencies in the
manifest.json
file:
_10//manifest.json_10_10 "dependencies": {_10 ..._10 "storydotspartnerar.storydots-virtual-greeting": "1.x"_10 }
- Add the
virtual-greeting
block to the desired theme's block e.g:
You can see an implemented example with minicart.v2 here
_15 ..._15 "flex-layout.col#minicart-footer": {_15 "children": [_15 "minicart-summary",_15 "flex-layout.col#add-virtual-greeting",_15 "minicart-checkout-button"_15 ]_15 },_15 "flex-layout.row#add-virtual-greeting": {_15 "props": {_15 "marginTop": 4,_15 "marginBottom": 7_15 },_15 "children": ["virtual-greeting"]_15 },
- You can now follow the same steps you would follow upon a new release of your store's theme. If you would like to test the integration in a
production
workspace different frommaster
, you can repeat the same steps in the desiredproduction
workspace. Keep in mind that you will need to submit the settings data again (step 2) after promoting the testproduction
workspace to themaster
workspace for the App to sync with the master workspace.
Widget example (Minicart):
virtual-greeting
props
Prop name | Type | Description | Default value |
---|---|---|---|
title | string | Virtual greeting widget title | Are you making a gift? |
subtitle | string | Virtual greeting widget subtitle | Add a free virtual greeting! |
Modus Operandi
When an order is marked as a gift purchase, the orderForm
object will be populated with the QR Image URL. This URL can be found in the orderForm[customData]
. You will then be able to get it from within your ERP or with a GET
request to VTEX's Orders API for printing and attaching it to the package. We use the orderFormId
to identify an order prior to its payment approvement.
Although the URL of the QR image is already available when the buyer completes the checkout, the image will not be available until the payment of the order has been confirmed, thus, when we receive the "payment-approved" event.
We attach to the orderForm 2 versions of the QR: the isolated Greeting QR (qrImage field), or the Greeting QR embedded in a pre-designed tag (tagImage field).
We also provide the raw URL that should be sent (or encoded as a QR) to the gift receiver in order to watch their greeting, in the field storyUrl
, along with unique code
that is assigned to that greeting.
e.g:
_18_18// GET /api/oms/pvt/orders/{orderId}_18 ..._18 "customData": {_18 "customApps": [_18 {_18 "fields": {_18 "tagImage": "https://api-dev.storydots.app/vtex/orders/c9fbe5134a3f46428bfcefedb4906a76/tag?identityType=cart",_18 "qrImage": "https://api-dev.storydots.app/vtex/orders/c9fbe5137b3f46428bfcefedb4906a76/qr?identityType=cart",_18 "storyUrl": "https://dev.storydots.app/story/p-5d74gb5ca7",_18 "code": "5d74gb5ca7"_18 },_18 "id": "storydots",_18 "major": 1_18 }_18 ]_18 }_18 ...
Order Custom Fields
props
Prop name | Type | Description |
---|---|---|
tagImage | string | Virtual greeting qr tag image |
qrImage | string | Virtual greeting isolated qr image |
storyUrl | string | Virtual greeting URL for receiver |
code | string | Virtual greeting unique code |
So, if you get the tagImage from within your system, you could extract the URL as:
_10const tagImageURl = orderForm.customData.customApps.filter(_10 (app) => app.id === 'storydots'_10)[0].fields.tagImage
Virtual Greeting SKU
You may provide us with a product SKU itemĀ Id
and that product will be added to the cart whenever a user adds Storydots Virtual Greeting.
Customization
No CSS Handles are available yet for the app customization.