Learn how to connect Engini to WooCommerce.
Using Engini’s WooCommerce activities, you can: create, edit and get customers, orders, products and variants.
Getting Started with WooCommerce #
Prerequisites #
- A WooCommerce account
Connecting Engini to WooCommerce #
Get your Customer Key (ck) #
Follow the next steps to get the customer key for your WooCommerce store:
- Log in to your WordPress Dashboard.
- In the left-hand sidebar, click on “WooCommerce”.
- Click on “Settings”.
- Click on the “Advanced” tab.
- Click on “REST API”.
- Click on the “Add Key” button to create a new API key.
- Enter a description for the API key and select the user that the key will be associated with.
- Select the level of access you want to grant the API key.
- Click on the “Generate API Key” button.
- The Customer Key will be displayed under “Consumer Key”.
Get your Customer secret (cs) #
After steps 1-9 the Customer Secret (customer password) will be displayed under “Consumer Secret”.
Add a connection to WooCommerce in Engini #
- Enter your Engini account at https://app.engini.io.
- Navigate to Connections page by clicking on the Connections on the left sidebar or by clicking here.
- Click on the Add connection option located at the topbar.
- Choose WooCommerce option from the available applications.
- Enter the following details in the “Edit Connection” form:
- Connection name
- WordPress URL
The WordPress URL of WooCommerce can be found in the WordPress Dashboard. Here are the steps to find it:- Log in to your WordPress Dashboard.
- In the left-hand sidebar, click on “WooCommerce”.
- Click on “Settings”.
- Click on the “Advanced” tab.
- Look for the “Site Address (URL)” fields.
- Customer Key (ck) – Enter the customer key you obtained from WooCommerce.
- Customer password – Enter the customer password you obtained from WooCommerce.
Triggers #
The trigger is executed automatically in response to a specific event, such as an order being created or updated.
Every workflow has to start with a trigger.
Orders #
Order updated #
Listens for an order’s updates.
- You can leave the trigger unedited. it will listen for every order update.
- Conditions
If you want the trigger “Order updated” to be activated only under a certain condition, click on the “Add Condition” button.
By choosing to add a condition, the workflow will only work if the condition or the number of conditions you added are met. Follow the next steps to add conditions:- Select from the drop down the field you want to add the condition on.
- Select the condition you want the record to meet.
- Click on the empty field and the tooltip will pop up showing the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-4 for all the fields you want to create a condition for.
Order created #
Listens for a new order creation.
- You can leave the trigger unedited. it will listen for every order creation.
- Conditions
If you want the trigger “Order created” to be activated only under a certain condition, click on the “Add Condition” button.
By choosing to add a condition, the workflow will only work if the condition or the number of conditions you added are met. learn more how to add conditions in section 2 of Order updated.
Products #
Product updated #
Listens for a product’s updates.
- You can leave the trigger unedited. it will listen for every product update.
- Conditions
If you want the trigger “Product updated” to be activated only under a certain condition, click on the “Add Condition” button.
By choosing to add a condition, the workflow will only work if the condition or the number of conditions you added are met. learn more how to add conditions in section 2 of Order updated.
Product created #
Listens for a new product creation.
- You can leave the trigger unedited. it will listen for every product creation.
- Conditions
If you want the trigger “Product created” to be activated only under a certain condition, click on the “Add Condition” button.
By choosing to add a condition, the workflow will only work if the condition or the number of conditions you added are met. learn more how to add conditions in section 2 of Order updated.
Customers #
Customer updated #
Listens for a customer’s updates.
- You can leave the trigger unedited. it will listen for every customer update.
- Conditions
If you want the trigger “Customer updated” to be activated only under a certain condition, click on the “Add Condition” button.
By choosing to add a condition, the workflow will only work if the condition or the number of conditions you added are met. learn more how to add conditions in section 2 of Order updated.
Customer created #
- You can leave the trigger unedited. it will listen for every customer creation.
- Conditions
If you want the trigger “Customer created” to be activated only under a certain condition, click on the “Add Condition” button.
By choosing to add a condition, the workflow will only work if the condition or the number of conditions you added are met. learn more how to add conditions in section 2 of Order updated.
Actions #
Customers #
Create Customer #
- Email
The Email can come from the trigger or another action you performed in the process before the “create customer” action.- Click on the empty field and the tooltip will pop up showing all the names you can use.
- Select from the tooltip the email of the new customer you create. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add Field
By clicking the “Add field” button, you can choose how to fill in the various fields in the customer you are creating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-c for all the fields you want to populate.
Update customer #
Edits an existing customer’s attributes.
- Customer id field
- Click on the empty field and the tooltip will pop up.
- Enter the customer id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add field
By clicking the “Add field” button, you can choose how to fill in the various fields in the record you are updating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-c for all the fields you want to populate.
Get customer #
Get one customer record.
- Customer id
- Click on the empty field and the tooltip will pop up.
- Enter the customer id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Get customers #
Get the records of all customers.
- Filter
You can specify which records will be returned from the search results by utilizing the “Add Filter” button.- Choose from the drop down the field you want to filter by.
- Select the condition you want the record to meet for the selected field.
- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-d for all the fields you want to populate.
- Advanced options
By clicking on the button next to “Advanced options” a field will open for you where you can define the maximum number of records you want to retrieve.
For example, by entering the value 1, the activity will return the first customer it finds that meets the conditions defined in the filters.
Products #
Create product #
- SKU
SKU stands for “Stock Keeping Unit”. Set the SKU of the product. - Name
The name of the new product you create.- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add field
By clicking the “Add field” button, you can choose how to fill in the various fields in the customer you are creating. You can add one field to more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-c for all the fields you want to populate.
Update product #
Edits an existing product’s attributes.
- Product id field
- Click on the empty field and the tooltip will pop up.
- Enter the Product Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add field
By clicking the “Add field” button, you can choose how to fill in the various fields in the record you are updating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-c for all the fields you want to populate.
Get product #
Get one product record.
- Product id
- Click on the empty field and the tooltip will pop up.
- Enter the Product Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Get products #
Get the record of all customers.
- Filter
You can specify which records will be returned from the search results by utilizing the “Add Filter” button.- Choose from the drop down the field you want to filter by.
- Select the condition you want the record to meet for the selected field.
- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-d for all the fields you want to populate.
- Advanced options
By clicking on the button next to “Advanced options” a field will open for you where you can define the maximum number of records you want to retrieve.
For example, by entering the value 1, the activity will return the first product it finds that meets the conditions defined in the filters.
Variant #
In WooCommerce, a variant refers to a specific variation of a product. Variants are essentially product options or attributes that can be customized by the customer. Each variant is associated with a unique SKU (Stock Keeping Unit) price, and can be managed separately in terms of inventory and pricing.
Create Product variation
#
- Product id
The id of the product for which you want to create a variant.- Click on the empty field and the tooltip will pop up.
- Enter the Product Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- SKU
SKU stands for “Stock Keeping Unit”. Set the SKU of the variant.- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Name
The name of the new variant you create.- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Description
You have the ability to define the product’s description.- Click on the field to show the tooltip with all the options you can choose.
- You can populate the fi
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add field
By clicking the “Add field” button, you can choose how to fill in the various fields in the customer you are creating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat these steps for all the fields you want to populate.
Update Variation #
- Product id
The id of the product for which you want to update the variant.- Click on the empty field and the tooltip will pop up.
- Enter the Product Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Variant id
The id of the variant you want to update.- Click on the empty field and the tooltip will pop up.
- Enter the Variant Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add field
By clicking the “Add field” button, you can choose how to fill in the various fields in the customer you are creating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you want to populate.
Get Product Variation
#
- Product id
The id of the product for which you want to Get the variant.- Click on the empty field and the tooltip will pop up.
- Enter the Product Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Variant id
- Click on the empty field and the tooltip will pop up.
- Enter the Variant Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Get Product Variations
#
- Click on the empty field and the tooltip will pop up.
- Select the product ID for which you’d like to Get its variations.
You can use:- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Attributes #
Create Attribute
#
- Name
The name of the new Attribute you create.- Click on the field to show the tooltip with all the options you can choose.
- You can populate the field in one of the following options.
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add Field
By clicking the “Add field” button, you can choose how to fill in the various fields in the Attribute you are creating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you want to populate.
Create Attribute Term
#
- Attribute id
The id of the Attribute for which you want to create it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Attribute Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add Field
By clicking the “Add field” button, you can choose how to fill in the fields in the Attribute term you are creating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you want to populate.
Delete Attribute
#
- Click on the empty field and the tooltip will pop up.
- Enter the id of the Attribute you want to delete. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Delete Attribute Term
#
- Attribute id
The id of the Attribute for which you want to delete it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Attribute Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Term id
The id of the Attribute term for which you want to delete it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Term Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Update Attribute
#
- Attribute id
The id of the Attribute for which you want to update.- Click on the empty field and the tooltip will pop up.
- Enter the Attribute Id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Add Field
By clicking the “Add field” button, you can select how to populate the fields in the Attribute you are updating. You can add one field or more to the activity definitions.- Choose from the drop down the field you want to fill.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you want to populate.
Update Attribute Term
#
- Attribute id
The id of the Attribute for which you want to update it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Attribute id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Term id
The id of the Attribute term for which you want to update it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Term id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Get Attribute
#
- Click on the empty field and the tooltip will pop up.
- Enter the id of the Attribute you want to get. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Get Attributes
#
Get the record of all Attributes.
Get Attribute Term
#
- Attribute id
The id of the Attribute for which you want to get it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Attribute id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Term id
The id of the Attribute term for which you want to get it’s Term.- Click on the empty field and the tooltip will pop up.
- Enter the Term id. you can use:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Get Attribute Terms
#
- Click on the empty field and the tooltip will pop up.
- Enter the id of the Attribute for which you want to get it’s Term.
You can use:- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
Arrays #
Initialize Meta Data Array #
Add this action to initialize a meta data array.
In WooCommerce, the “meta data” refers to additional information related to various components of your online store such as products, orders, accounts. This metadata can be used to store and retrieve custom information or properties about products, orders, or accounts that are not part of the default WooCommerce data structure.
For example, in the context of products, you can add custom metadata to a product to store information such as product dimensions, weight, SKU, or any other specific details not covered by the default product fields. This can be useful for customizing your product listings. , providing additional information, or to use adjustments and supplements.
Add Meta Data to array #
- To use this action, you first need to initialize a meta data array.
- Click on Add field button.
- Click on the small arrow to choose the type of the field.
- Choose the type of the field:
- Key: The key is a string that serves as a unique identifier for a specific piece of meta data associated with an object. It is used to differentiate one piece of meta data from another.
- ID: The ID is a unique identifier for the object to which the meta data is attached. The meta data is associated with this ID, allowing you to retrieve or update the meta data for that specific object.
- Value: The value is the actual data associated with the key. It can be of various data types, including strings, numbers, arrays, or even more complex data structures.
Initialize Product Attributes Array #
Add this action to initialize a Product Attributes array.
In WooCommerce, “Product Attributes” are a way to add additional information to your products.
Add Product Attribute to Array #
- To use this action, you first need to initialize a product attribute array.
- Variable – Click the small arrow to Choose the array.
- Click on the name of the desired array from the dropdown that opens.
- Click on the “add field” button to add a field.
- Click the arrow to select the field you want to populate.
- Next to the field name, fill in the empty field with the value you want to populate in that field.
- Repeat steps 4-6 to add more fields to the object in the array.
Initialize Variation Attributes Array #
Add this action to initialize a Variation Attributes array.
In WooCommerce, “Variation Attributes” are attributes that are used to create and manage variations of a variable product.
Add Product Variation Attribute to array #
- To use this action, you first need to initialize a Variation attribute array.
- Variable – Click the small arrow to Choose the array.
- Click on the name of the desired array from the dropdown that opens.
- Click on the “add field” button to add a field.
- Click the arrow to select the field you want to populate.
- Next to the field name, fill in the empty field with the value you want to populate in that field.
- Repeat steps 4-6 to add more fields to the object in the array.