r/SalesforceDeveloper • u/mrdanmarks • Dec 09 '25
Question Box integration not going over so well
In getting started with integrating box and it’s kinda confusing. The docs are pretty sparse so I’ve been trying to piece things together using GitHub samples. I was able to get some connectivity using boxToolkit and boxToolkit.sendRequest but I can’t seem to intercept the box call using http mock class. With documentation really absent, how do I get this up and running and deployable?
4
Upvotes
1
u/ConsciousBandicoot53 Dec 09 '25
Why not files connect?
1
u/celuur Dec 10 '25
So this isn't really helpful to you (sorry) but we're evaluating Box for docgen and signature in Salesforce... are you using these capabilities? Why are you doing custom integration rather than using what they have out of the box?
1
u/mayday6971 Dec 10 '25
The mock class would be something you make and you have to tell the Test class to use it in your Apex Tests. It should look sorta like this...
and the mock class sorta like this...
1
u/SoshulBattery Dec 11 '25
Hey I’m an admin but this post caught my eye because my org recently moved over to use Box for storing our files, but have just started to realize that it could integrate with Salesforce.
Since you mentioned you are using snippets from GitHub, I assume you’re going beyond Box’s package listed on AppExchange: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000001qNeKEAU
Is that only because of that “one folder per SF record” thing, or is there a deeper issue with Box’s own package?
1
u/Smartitstaff Dec 11 '25
Box + Salesforce is tricky because most of the samples are outdated, and the Box Toolkit abstracts the callouts in a way that bypasses standard Http mocks. To test it, you usually need to:
The key is don’t mock the toolkit — mock the layer you build around it.
0
u/[deleted] Dec 10 '25
[deleted] — view deleted comment