Set up the Shopify app
This guide describes how to set up the Talon.One Shopify app for use with your Shopify store.
Basic setup
Prerequisites
- Discount effects require network access for Shopify Functions, which is available with Shopify for enterprise. Shopify support must explicitly enable network access for Shopify Functions.
- Discounts are applied via the Storefront API
using the
@deferdirective. If a store uses the Ajax API to manage the cart, discounts won't be visible until the customer reaches checkout. - Discounts are managed in Talon.One and not synchronized to Shopify. They are applied and displayed in the storefront, but won't appear in the Discounts section of the Shopify admin.
- The Shopify integration only supports case insensitive coupons. In the Application settings, ensure the Case Insensitive, stored in uppercase (recommended) option is selected.
- You cannot apply multiple coupons offering the same type of discount to the same order. For example, you cannot apply two coupons that both offer shipping discounts to the same order.
- If you are using both shipping and order/item discounts, ensure your campaign evaluation order is set up so that shipping discounts are evaluated after order/item discounts.
- You are an administrator user in Shopify.
- You have created a Third-party API key for use with Shopify.
- You have created an additional cost
in Talon.One, with the following properties:
- Scope:
Cart (Session) - API name:
shipping
- Scope:
- If you are using collections, you have created the following custom attribute
in Talon.One:
- Entity: Cart Item
- Type: List of Strings
- API name:
collections
Install the app
- Find the app in the Shopify App Store.
- Click Install.
- In your Shopify admin, to authorize the use of the app, click Install.
After the app is installed, you can view and use it from the Apps page in your Shopify admin.
Configure the app
- In Shopify, open Apps > Talon One.
- On the Talon.One Integration page, configure the following parameters:
- API Key: Paste the Third-party API key you created.
- Deployment URL: Type the base URL of your Talon.One deployment, for example,
mycompany.europe-west1.talon.one.
- To test the connection with the values provided, click Connect.
- If the test is successful, click Save.
Configure product data sync
- In Shopify, open Apps > Talon One > Product data sync.
- Leave the Catalog ID option at
0. You'll set the ID when syncing your product inventory. - In Standard attributes and Metafields, specify the product attributes and
product variant metafields you want to sync across Shopify and Talon.One.
Note
- Required attributes are preselected and cannot be changed.
- Attributes that don't exist in Talon.One are created automatically on save.
- The
skuattribute is created assku_shopifyin Talon.One. - For metafields, the following applies:
- Only product variant metafields are supported.
- The namespace is not included in the Talon.One attribute names. For example, a
metafield with the namespace
customand the keycoloris synced as an attribute namedcolorin Talon.One.
- Click Confirm and save.
Configure customer data sync
- In Shopify, open Apps > Talon One > Customer data sync.
- In Standard attributes and Metafields, specify the customer attributes you want
to sync across Shopify and Talon.One.
Note
- Attributes that don't exist in Talon.One are created automatically on save.
- For privacy reasons, some customer attributes are not available for syncing, for example, email or phone number.
- The metafield namespace is not included in the Talon.One attribute names. For
example, a metafield with the namespace
customand the keyvip_statusis synced as an attribute namedvip_statusin Talon.One.
- Click Confirm and save.
We highly recommend carrying out this step before syncing any customer data. For existing customer data, the following limitations apply:
- Adding attributes does not update existing customer profiles in Talon.One. To apply the changes, you must manually update each existing profile.
- Removing attributes does not remove existing data in Talon.One, even if you manually update customer profiles later.
Configure transaction data sync
- In Shopify, open Apps > Talon One > Transaction data sync.
- In Transaction Attributes, select the cart, checkout, and order attributes you want
to sync across Shopify and Talon.One.
Note
- Attributes that don't exist in Talon.One are created automatically on save.
- All of these attributes are created as session attributes in Talon.One, so they are part of the customer session.
- The Cart, Checkout, and Order columns show which stages an attribute is
populated in. For example,
order_nameis only populated once the order is placed, whileshop_domainis populated from the cart stage onwards. Shared indicates that the attribute is populated in all stages. - Discount campaigns may not be able to reliably use attributes that only become
available at the checkout or order stage. For example, if a campaign depends on
channel, the discount function runs before the checkout webhook is processed, so thechannelsession attribute isn't available yet.
- Click Confirm and save.
Enable the app embed
This step is only required for theme-based stores.
Enabling the Loyalty sync app embed allows you to retrieve customer data from Talon.One for use in Shopify.
- Ensure the Talon.One Shopify app is installed.
- In Shopify, open Online Store > Themes.
- Find the theme that you want to edit and click Edit theme.
- On the left side of the header, click App embeds.
- Next to the loyalty-sync app embed, click the toggle button.
- Click Save.
For more information, see our tutorial.
Enable POS support
This step is only required if you use Shopify POS (Point of Sale).
- Ensure you have an existing POS sales channel in Shopify.
- In Shopify, open Sales channels > Point of Sale > Settings.
- In the General section, click POS apps.
- Click Talon.One POS integration.
- Next to Smart grid tile, click Add.
A Talon.One tile automatically displays in the smart grid of your POS app. Also,
within the cart, the session ID is shown along with any discounts that apply to the
transaction.Considerations when using the POS integration
null.
Configure custom error messages
By default, Shopify shows its own standard error messages when a customer enters an invalid discount code. You can configure the app to show custom messages instead, based on the error code returned by Talon.One.
-
In Shopify, open Apps > Talon One > Custom error messages.
-
Select Enable custom error messages.
-
In Accept all discount codes, configure whether to accept discount codes from Talon.One, Shopify, and third-party coupon providers, or only Talon.One codes. The following table shows how codes are handled in each case.
Code Option enabled Option disabled Valid Talon.One code Accepted Accepted Valid Shopify or third-party code Accepted Rejected, custom CouponNotFoundmessage or fallback message shownInvalid Talon.One code Rejected, custom error message shown Rejected, custom error message shown Invalid Shopify or third-party code Rejected, standard Shopify error message shown Rejected, custom CouponNotFoundmessage or fallback message shownNoteIf Accept all discount codes is enabled, coupon validation occurs after the customer enters a shipping address, which is the standard Shopify behavior. If disabled, validation occurs directly at checkout.
-
In Fallback generic message, type the message to show when a specific message field is left blank, or when Talon.One returns an unknown error code.
-
For each error code you want to customize, in Custom error message, type the message to show to customers for that error code.
-
Click Confirm and save.
Enable Markets support
This step is only required if you use Shopify Markets to sell in multiple countries or regions.
- In Shopify, open Apps > Talon One > Markets.
- Click Enable Shopify Markets.
- Click Save.
When Shopify Markets support is enabled for the first time, the Talon.One Shopify app creates the following attributes in Talon.One:
| API name | Type | Entity | Format |
|---|---|---|---|
shopify_market_country | String | Customer Session | Two-letter country code following ISO 3166-1 alpha-2, for example, US or AR. |
shopify_market_currency | String | Customer Session | Three-letter currency code following ISO 4217, for example, USD or ARS. |
Considerations when using Shopify Markets
- Shopify determines the customer's country once they enter their shipping address. As
a result,
shopify_market_countryis only populated at checkout, not at the cart stage.shopify_market_currencyis populated from the cart stage onwards. - For merchants selling digital goods that don't require a shipping address,
shopify_market_countryis never populated.
For more information, see our tutorial.
Next steps
You have completed the basic setup of the Talon.One Shopify app.
To use the app effectively, additional configuration steps are required, based on your specific use cases.
Read our tutorials to learn how to set up the app for your needs.