Model: thomfoolery/AIE5-MidTerm-finetuned-embeddings
Author: thomfoolery
Pipeline: sentence-similarity
Library: sentence-transformers
Tags: sentence-transformers, safetensors, bert, sentence-similarity, feature-extraction, generated_from_trainer, loss:MatryoshkaLoss, loss:MultipleNegativesRankingLoss, dataset_size:164, arxiv:1908.10084, arxiv:2205.13147, arxiv:1705.00652, base_model:Snowflake/snowflake-arctic-embed-l, base_model:finetune:Snowflake/snowflake-arctic-embed-l, model-index, text-embeddings-inference, endpoints_compatible, region:us
Base models (finetune): id: Snowflake/snowflake-arctic-embed-l
Card metadata: tags: sentence-transformers, sentence-similarity, feature-extraction, generated_from_trainer, loss:MatryoshkaLoss, loss:MultipleNegativesRankingLoss, dataset_size:164
base_model: Snowflake/snowflake-arctic-embed-l
widget: source_sentence: What steps must be taken before an app can receive communication from Flow actions?
sentences: Before your app can receive communication from Flow actions, you need to create one or more standardized API endpoints on your web server. Review the information for each endpoint to understand its requirements, the format of the payload, and the expected response. You'll also learn how to avoid processing duplicate requests, identify an action by its ID, and verify requests for security purposes., Apps must be properly configured to respond to trigger lifecycle callbacks. When a merchant attempts to enable a workflow that uses the trigger, Shopify Flow sends a lifecycle callback to the app's web server. If it doesn't promptly receive a response or receives a response with an HTTP status code that isn't 2xx, then the merchant can't enable the workflow and make use of the trigger.

Note: Legacy trigger discovery webhook extensions created using the Partner Dashboard are deprecated and must migrate to the CLI before they can be edited.

How trigger lifecycle callbacks work

Trigger lifecycle callbacks contain identifying information about the trigger and the store using it and indicate whether the trigger is being used. You can use this information to track the stores that are currently using your triggers and then send trigger requests to only those stores.

Properties, Enter a title and description for the action. In the Action Preview area, you can see how the title and action display to merchants when they're choosing actions in Shopify Flow.

Enter the URL for the action execution endpoint that you created. Shopify Flow sends the action's JSON payload to this endpoint when it's about to execute your action.

Step 2: Customize a Flow action configuration file

In this section you'll use the default action template and update it to be a functional extension example. Once you have generated a Flow extension using Shopify CLI, follow the instructions below:

Change the description to Place a bid on an auction.

Update the extensions.runtime_url to an endpoint where you can receive the runtime request.

On the second settings.fields field, update the following values:

type to number_decimal

key to amount

name to Bid Amount

Add a description property and set it to The amount of the bid, source_sentence: What type and key are assigned to the second settings.fields field in the configuration?
sentences: [[settings.fields]] type = "customer_reference"

[[settings.fields]] type = "single_line_text_field" key = "your field key" ```

Trigger extension properties

Extension properties are listed in the [[extensions]] section and enable you to define the interface between Flow and your event.

Property name Description Rules name Required Name of your extension. Will be the merchant-facing name of your task in the editor. This should be something that is human readable. type Required The type of your extension. This should always be set to “flow_trigger” for Flow triggers. - Value must be flow_trigger . handle Required A unique identifier for your extension. This property cannot be changed once you’ve run the dev or deploy command. - Cannot exceed 30 characters. - Must be unique across your app's extensions. - Must only contain alphanumeric characters and hyphens. description Optional A description of your extension. This description will be shown in the Flow editor navigation panel., Change the description to Place a bid on an auction.

Update the extensions.runtime_url to an endpoint where you can receive the runtime request.

On the second settings.fields field, update the following values:

type to number_decimal

key to amount

name to Bid Amount

Add a description property and set it to The amount of the bid

```bash [[extensions]] name = "Place Auction Bid" type = "flow_action" handle = "place-bid" description = "Place a bid on an auction" runtime_url = "https://your-server-domain/path/to/action/handler"

[settings]

[[settings.fields]] type = "customer_reference" required = true

[[settings.fields]] type = "number_decimal" key = "amount" name = "Bid Amount" description = "The amount of the bid" required = true ```

Step 3: Configure your web server

To build a Shopify Flow action, you need to add a service to your web server to listen for the JSON payload that Shopify Flow sends when the action runs.

Optionally, you can also add the following:, To give merchants a more seamless action configuration experience, and to allow them to manage resources that are external to Shopify Flow, you can embed a page from your app in the Shopify Flow editor.

In your Shopify Flow action configuration, merchants see a preview with an image and text that's fetched from your custom configuration page preview URL. Merchants can click the button to access the custom configuration page.

Your custom configuration page is then displayed in a frame in the Shopify admin.

In this tutorial, you'll learn how to render a custom configuration page in Shopify Flow, customize the page frame, and access data relevant to your action in the custom configuration page context.

Requirements

You've created a Partner account.

You've created an app.

Resources

To implement this feature, you'll use the following:

Shopify App Bridge

App Bridge components

App Bridge actions specific to the custom configuration page

Implementing a custom configuration page, source_sentence: What is the purpose of updating the description in the flow extension to "Trigger for auction bids"?
sentences: The following procedure requires you to have generated a flow extension using Shopify CLI. In this section you'll use the default trigger template and update it to be a functional extension example.

Change description to Trigger for auction bids.

On the second [[settings.fields]] field, update:

type to number_decimal

key to Amount

```bash [[extensions]] name = "Auction Bid Placed" type = "flow_trigger" handle = "auction-bid-placed" description = "Trigger for auction bids."

[settings]

[[settings.fields]] type = "customer_reference"

[[settings.fields]] type = "number_decimal" key = "Amount" ```

Step 3: Enable the draft version of your trigger

Running app dev allows changes made to local files to update the draft version of your Flow task extensions. The draft version is only available in your development store., Custom step descriptions added within the workflow.

Adding additional locales

Add new .json files prefixed with the locale, for example es.json.

Add default to one of the locales to make it the fallback if a merchant's locale isn't in the locales you have provided. Example: en.default.json.

Step descriptions

You can provide translated custom step descriptions by adding a translation key wrapped by curly braces in the step description field. For example, {expressShippingCondition}. Ensure there's no other characters before or after {yourKey}. After adding this to your workflow, you can update the translation files to include the step description.

The following is an example:, Supported field types

When you create a trigger, you add the fields that your trigger sends to Shopify Flow in the [settings] section of the TOML file. These fields define what your event plans to send to Shopify Flow. Merchants can then use that data in their conditions and actions.

You can add two types of fields: custom fields or predefined reference fields.

Reference field types

A reference field lets you send the identifier of a Shopify resource to Shopify Flow. This allows merchants to build workflows that use any data related to that resource.

For example, your trigger sends a customer ID to Shopify Flow. The merchant can create a condition that checks customer / amountSpent and customer / tags. In their action, the merchant can include the template variables for customers, such as {{customer.email}}.

To specify that a trigger will include a reference field, you only need to specify the type and an optional description property. For example:

```bash ...

[settings], source_sentence: How can you add custom configuration page URLs to your Shopify Flow action configuration?
sentences: Custom step descriptions added within the workflow.

Adding additional locales

Add new .json files prefixed with the locale, for example es.json.

Add default to one of the locales to make it the fallback if a merchant's locale isn't in the locales you have provided. Example: en.default.json.

Step descriptions

You can provide translated custom step descriptions by adding a translation key wrapped by curly braces in the step description field. For example, {expressShippingCondition}. Ensure there's no other characters before or after {yourKey}. After adding this to your workflow, you can update the translation files to include the step description.

The following is an example:, Navigate to your app directory.

Run the following command to start using draft versions of your extension(s):

```bash

!/bin/bash

shopify app dev ```

Follow the prompts.

Step 4: Test your trigger

After the app dev command has started, you can test the draft version of your trigger in Shopify Flow.

In your development store, create a workflow that uses the trigger that you created for your app.

Using the Admin GraphQL API, send a flowTriggerReceive mutation with the following arguments:

The handle of the trigger

The payload of the trigger containing the fields defined in the extension TOML

The size of the payload (keys included) must be under 50 KB. If the size of the properties body exceeds the limit, then Shopify responds to the GraphQL request with a validation error reading Properties size exceeds the limit of 50000 bytes. As a result, workflows with the specified trigger won't start from this request.

The following is an example of a flowTriggerReceive mutation:, const titleBar = TitleBar.create(app, { title: '', buttons: { primary: primaryBtn, secondary: [secondaryBtn], }, })

// update buttons after initialization const newPrimary = Button.create(app, { label: 'New button', }) newPrimary.subscribe(Button.Action.CLICK, () => { console.log('new primary button clicked') })

titleBar.set({ buttons: { primary: newPrimary, secondary: [secondaryBtn], }, })

jsx import { TitleBar } from '@shopify/app-bridge-react'

function Page() { const buttons = { primaryAction: { content: 'Button 1', onAction: () => { console.log('button 1 clicked') }, }, secondaryActions: [ { content: 'Button 2', onAction: () => { console.log('button 2 clicked') }, }, ], }

return } ```

Next steps

Add custom configuration page preview URL and custom validation endpoints to your app.

Add your custom configuration page preview URL, custom configuration page URL, and custom validation URL to your Shopify Flow action configuration., source_sentence: How can you access step and property information on the custom configuration page?
sentences: Property Data type Description Example flow_trigger_definition_id String The unique identifier for your Shopify Flow trigger. Add row to spreadsheet has_enabled_flow Boolean Whether the store has an enabled workflow that uses your trigger. Valid values: true : There is at least one workflow that is enabled and that uses your trigger. false : There are no enabled workflows that use your trigger. true shop_id Number The unique identifier for the Shopify store. 690933842 shopify_domain String The myshopify domain of the Shopify store. johnsapparel.myshopify.com timestamp ISO 8601 date and timestamp The time when the notification was created. Notifications with newer timestamps should take precedence. If you already have a timestamp in your datastore and you receive a newer timestamp, then overwrite this payload's information in your datastore. Conversely, if you receive a timestamp that is older than the information in your datastore, then ignore this payload. 2019-01-25T16:44:10.999Z, Implementing a custom configuration page

To build a custom configuration page, you'll use Shopify App Bridge to render a page from your app page in Shopify Flow.

From the context of the custom configuration page, you can then access step and property information that you can use to display the appropriate information.

You can also add additional buttons to the App Bridge title bar, or trigger a redirect to the previous page.

Use Shopify App Bridge to render your app page

Note: The specifics of the Custom Configuration Page integration varies between Shopify App Bridge versions. Make sure you implement the integration specific to your Shopify App Bridge version.

To render your custom configuration page, you need to integrate Shopify App Bridge on the route that you want to render. To learn about setting up Shopify App Bridge, refer to one of the following pages:

Getting started with Shopify App Bridge

Getting started with App Bridge React

Access action information, To give merchants a more seamless action configuration experience, and to allow them to manage resources that are external to Shopify Flow, you can embed a page from your app in the Shopify Flow editor.

In your Shopify Flow action configuration, merchants see a preview with an image and text that's fetched from your custom configuration page preview URL. Merchants can click the button to access the custom configuration page.

Your custom configuration page is then displayed in a frame in the Shopify admin.

In this tutorial, you'll learn how to render a custom configuration page in Shopify Flow, customize the page frame, and access data relevant to your action in the custom configuration page context.

Requirements

You've created a Partner account.

You've created an app.

Resources

To implement this feature, you'll use the following:

Shopify App Bridge

App Bridge components

App Bridge actions specific to the custom configuration page

Implementing a custom configuration page
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics: cosine_accuracy@1, cosine_accuracy@3, cosine_accuracy@5, cosine_accuracy@10, cosine_precision@1, cosine_precision@3, cosine_precision@5, cosine_precision@10, cosine_recall@1, cosine_recall@3, cosine_recall@5, cosine_recall@10, cosine_ndcg@10, cosine_mrr@10, cosine_map@100
model-index: name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
results: task: type: information-retrieval
name: Information Retrieval
dataset: name: Unknown
type: unknown
metrics: type: cosine_accuracy@1
value: 0.5416666666666666
name: Cosine Accuracy@1
verified: no, type: cosine_accuracy@3
value: 1
name: Cosine Accuracy@3
verified: no, type: cosine_accuracy@5
value: 1
name: Cosine Accuracy@5
verified: no, type: cosine_accuracy@10
value: 1
name: Cosine Accuracy@10
verified: no, type: cosine_precision@1
value: 0.5416666666666666
name: Cosine Precision@1
verified: no, type: cosine_precision@3
value: 0.3333333333333333
name: Cosine Precision@3
verified: no, type: cosine_precision@5
value: 0.20000000000000004
name: Cosine Precision@5
verified: no, type: cosine_precision@10
value: 0.10000000000000002
name: Cosine Precision@10
verified: no, type: cosine_recall@1
value: 0.5416666666666666
name: Cosine Recall@1
verified: no, type: cosine_recall@3
value: 1
name: Cosine Recall@3
verified: no, type: cosine_recall@5
value: 1
name: Cosine Recall@5
verified: no, type: cosine_recall@10
value: 1
name: Cosine Recall@10
verified: no, type: cosine_ndcg@10
value: 0.8144765845238192
name: Cosine Ndcg@10
verified: no, type: cosine_mrr@10
value: 0.75
name: Cosine Mrr@10
verified: no, type: cosine_map@100
value: 0.75
name: Cosine Map@100
verified: no
Likes: 0 | All-time downloads: 10
Created: 2025-02-24 18:27:56