Toki.

Docs/Merchants/Product Features

Connect exclusive product rules to checkout

Last updated

Exclusive product rules decide who can buy a collection, and how. For Shopify to enforce those rules when a customer adds a product to the cart, you connect a validation function to Toki once, by pasting its ID on the Exclusive Products page. From then on, every time you save your rules, Toki sends the latest version to that function.

What the connection does

A validation function is a checkout rule in your Shopify admin. Once it's connected, it checks every cart against your exclusive product rules. A product that doesn't qualify stays out of the cart, and the customer sees a message you write.

The connection covers:

  • Every rule where Purchase With is Money.
  • Every rule that completes through Checkout (Cart), whether it's paid with money or points.

Rules paid with Points that complete through Draft Order create a draft order and send the customer to its checkout page, so they don't rely on the cart check.

Connect the validation function

  1. In your Shopify admin, open Settings, then Checkout. In the Checkout Rules section, click Add rule, select Toki's Exclusive Products Validation, click Activate, then click Save. Toki needs that rule's ID, so copy it. If you don't see the validation in the list, chat with us and we'll set it up with you.
  2. In Toki, open Exclusive Products.
  3. In the Validation Function card, paste the ID into Validation Function ID. It's a number, like 12345678.
  4. Click Save. You see Saved when the connection is in place.

The help text under the field has a link that opens the Checkout rules section of your Shopify admin directly.

You can create rules before or after this step. Rules you save before the connection are stored in Toki, and Shopify starts applying them in the cart as soon as you save the page with the ID in place.

If the ID isn't accepted

When Shopify has no validation function with the ID you entered, Toki shows this message under the field:

Validation function with this id does not exist. Please check the validation function ID.

You also see a short notice: Validation function not found. Please check the form and try again. Go back to the Checkout rules section in your Shopify admin, copy the ID again, paste it, and save.

What the cart checks

Each check comes with its own message. You write the messages in the Cart validation messages section of each rule on the Exclusive Products page.

What the cart checksWhich rulesMessage the customer sees
The customer belongs to the rule's SegmentRules with a Segment set. A rule with no segment applies to everyone.Required access message
The customer is not in the rule's Blocked SegmentRules with a Blocked Segment setBlocked access message
The product is free in the cart, covered by the points discountRules paid with Points that complete through Checkout (Cart)Free product message. Can include {{product_title}}, which becomes the product's name.
The quantity in the cart is within Maximum QuantityRules that complete through Checkout (Cart) with Limit Quantity turned onQuantity limit message. Can include {{max_quantity}}, which becomes the limit.

Each message field shows an example in gray. Leave a field empty and the customer sees that example text as the message; the standard messages are in English. Write your own so the wording matches your store's voice. The standard messages are listed in Exclusive products.

Keep the connection current

  • Each time you click Save on the Exclusive Products page with an ID in the field, Toki sends your current rules to that validation function. Add, change, or remove rules as usual, then save.
  • The field keeps the ID you saved last. If you clear it and save, the previous ID comes back. To switch to a different validation function, paste its ID over the old one and save.

Plans

Exclusive Products, including the Validation Function ID field, is available on Toki's paid plans. Open Billing to compare plans.

Related

Didn't find what you need? Chat with us — a human answers, usually within the hour.