Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Create Metafield

This action is used to create a metafield for a resource such as customer, draft order, order , product etc.

 

Input

...

 

Response Payload

{
"metafield": {
"id": 20794390872130,
"namespace": "test metafield",
"key": "test_1",
"value": "test",
"value_type": "string",
"description": "This is a test metafield",
"owner_id": 932223320130,
"created_at": "2023-04-07T05:19:02-04:00",
"updated_at": "2023-04-07T05:19:02-04:00",
"owner_resource": "draft_order",
"type": "single_line_text_field",
"admin_graphql_api_id": "gid://shopify/Metafield/20794390872130"
}
}

 

 

Update Metafield

This action is used to update the metafield

 

Input

...

 

Resource Payload

{
"metafield": {
"value": "test1",
"value_type": "string",
"owner_id": 932223320130,
"namespace": "test metafield",
"key": "test_1",
"id": 20794390872130,
"description": "This is a test metafield",
"created_at": "2023-04-07T05:19:02-04:00",
"updated_at": "2023-04-07T05:43:48-04:00",
"owner_resource": "draft_order",
"type": "single_line_text_field",
"admin_graphql_api_id": "gid://shopify/Metafield/20794390872130"
}
}

 

 

Get Metafield Info

This action is used to bring up information regarding a particular metafield using metafield and resource ids.

 

Input

...

 

Response Payload

{
"metafield": {
"id": 20794390872130,
"namespace": "test metafield",
"key": "test_1",
"value": "test1",
"description": "This is a test metafield",
"owner_id": 932223320130,
"owner_resource": "draft_order",
"type": "single_line_text_field"
}
}

 

 

Search Metafields

This action is used to search for metafields associated with a resource.

 

Input

...

 

Response Payload

{
"metafields": [
{
"id": 20794390872130,
"namespace": "test metafield",
"key": "test_1",
"value": "test1",
"description": "This is a test metafield",
"owner_id": 932223320130,
"owner_resource": "draft_order",
"type": "single_line_text_field"
}
]
}

 

 

Delete Metafields

This action is used to delete metafields using the metafield Id and resource Id

 

Input

...

 

Response Payload

[
]

 

Shopify Triggers

UChat now supports native webhook integration with Shopify. There is now no need to use inbound webhooks anymore as not only this native integration has any webhook limitations but also avoids other problems such a removal of webhooks from shopify store, unresponsive and empty payloads etc.

 

Re-Establishing Connection with Shopify

 

Re-establishing connection with shopify in an important step for this update to start working. Follow the steps below to establish the connection:

 

On Workspace dashboard, click on Integrations and then click on shopify. Afterwards click on Save button and your connection will be re-established.

 

...

 

Finding & Selecting the Shopify Triggers

 

Once inside your bot, follow the below steps to find and use the triggers.

 

Click on Automation from the left side of the scroll bar and then select Triggers from the top.

 

...

 

Click on “New Trigger” and scroll down till you see Shopify Webhook, select it.

 

...

 

Native Webhook Actions

 

UChat supports the following native actions as of now.

 

...

How To Use The Triggers

 

Follow the below visual guide for using the triggers

...

 

After adding the details and mapping the variable, attach the trigger to a subflow as:

 

 

...

 

 

We are now ready to use the triggers.