Delete record

Learn how to use the delete record operation on your table by using a opt-out flow example.

Deleting a record on your table means that you will delete a row on your table.

This means that you'll go from this:

nameemail_address is_susbcribed

Agatha

agathamorisca@test.com

TRUE

To that:

nameemail_addressis_susbcribed

Delete a record

To delete a record on your table:

  1. Make sure you already have a filled table. For this example, we will use an opt in/opt out table that captures:

  • name: Captures customer's name

  • email_address: Store customer's email address

  • is_susbcribed: Store customer's consent to be susbcribed to campain

  1. Make sure that you capture the relevant variables in your conversation. In our example, we capture {userName} in Collect input blocks. This is the variable that we will use as a filter to target certain row to be deleted.

  2. Add a Table operation to your flow.

  3. Select Delete record.

  4. Select the table that you'd like to work on. For this example, we called our table Subscription.

  5. To target certain row to be deleted, a selection criteria needs to be defined. For this example, we filter out by looking at the 'name' column. If the name equals {userName}, it means that the row will be deleted once the opt out flow is triggered.

  1. Click Save.

  2. Add a Message block as a Go to to let your customer know that they are successfully opted out.

Test your flow

It's crucial to check the functionality of your Delete record operation to ensure that the correct row is deleted:

  1. Test your bot in the emulator. Run through your bot flow within the emulator to simulate the user experience and trigger the Delete Record action.

  1. Open your table, and verify that the bot deleted the correct row.

Looking for a quick and easy bot template to play with Tables? The Gym bot is a representative use case.

Last updated