0

My application sends blocks to slack that require user decision about certain things. Let's simplify it and say it's a "yes" or "no" button click. The thing is--- the object this decision works should work on is a combination of app_domain -> element_type -> element_id -- those three fields are a MUST to identify which object to work on.

Maybe I'm reading the docs wrong, but it seems Slack is pretty limiting and there is absolutely no place to include a custom struct that'll go along with every message the ping-pong of app -> slack and slack -> app interaction. I am limited to block_id and action_id pretty much and there is absolutely nothing else I can put custom context-keeping data on. I don't get this crude limitation. Do I really have no other choice other than putting "xxxxxx|xxxxxxxx|xxxxxx" on the block_id string so that I can later decode those three IDs in my app to know what objects to work on when the user clicks an interactive button?

There's got to be a smarter way. Any pointers?

JasonGenX
  • 4,952
  • 27
  • 106
  • 198

1 Answers1

1

There's another customizable field in the blocks:

private_metadata

https://api.slack.com/reference/surfaces/views

FrinkLabs
  • 71
  • 1
  • 4
  • Thanks. It's amazing how I spent a day running around in circles in Slack's docs without encountering this – JasonGenX Nov 03 '20 at 02:06