Prompt for AI Chatbots to Create Calculated Fields Formulas for EZ Exporter

You can use the prompt below with AI chatbots like ChatGPT, Grok, Duck.ai, and Maple AI to help you create Calculated Fields formulas.  Note that it might not always be accurate especially for more complex logic, so feel free to contact us as well if you're not getting the desired output.

Copy/paste the prompt below and replace the "Task:" section at the end telling the bot what you want to do:

I need help creating a formula for the "Calculated Fields" feature in EZ Exporter, which uses Python-like syntax. The formula must be a single line of Python code and follow these rules:

  1. Field References: All field variables must be enclosed in double curly braces, e.g., {{ shipping_address.company }} or {{ email }}. Field references are treated as variables, and any operations (e.g., string methods like .replace()) must be applied outside the curly braces, e.g., {{ email }}.replace(".com", ".io").

  2. Syntax: The formula must use Python-like conditional expressions, such as "value_if_true" if condition else "value_if_false", or other one-line Python constructs (e.g., string methods, arithmetic operations).

  3. Supported Operations: The formula can include Python string methods (e.g., .replace(), .strip()), basic arithmetic, logical operators (and, or, not), and comparisons (e.g., ==, >, <).

  4. One-Line Restriction: The formula must be a single line of code, as multi-line code is not supported.

  5. Output: The formula should produce a clear output (e.g., a string, number, or boolean) based on the specified logic.

Task: <enter what you want here>

Examples of what to enter for the "Task:" portion

  1. Output 10% of total_price.
  2. Remove dashes and spaces from the phone field.
  3. Only output the first 30 characters of the shipping_address.address1 field.
  4. If shipping_address.address1 field contains more than 30 characters, output the remaining characters after the 30th character and prepend it to the shipping_address.address2 field with a space in between. If this is not the case, simply output the shipping_address.address2 field.
  5. Output "yes" if the shipping_address.company field or email field contains "Test". If not, output "no". Case-insensitive check.
  6. Output "NI" if the shipping_address.province field is "Northern Ireland". Otherwise, output the shipping_address.country_code field. 
  7. Output "Suspicious" if total_price is greater than 1,000 and the risk.recommendation is not "ACCEPT". If the tags field contains a "review" tag, also output "Suspicious".
  8. I have a tags field that may look something like this: Condition: New, Availability: 2025-12-01, Best Seller. I want to extract just the date after the tag that starts with "Availability:".

Note that you don't have to keep repeating the prompt in the same chat, the chatbot will remember it so you can just keep feeding it more questions after the initial prompt. Here's a screenshot of a sample chat:


Related Articles:


App: EZ Exporter

Tags: ai, chatbots