FuelSDK-Ruby
FuelSDK-Ruby copied to clipboard
[BUG] - 400 response when inserting or updating Data Extension rows
Describe the bug
A few months ago, we started receiving 400s when doing a post
on ::MarketingCloudSDK::DataExtension::Row
. The only message we get with the response is Bad Request
. I did notice that this gem has not been updated in a while, does it just need to be updated?
To Reproduce
def auth_client
::MarketingCloudSDK::Client.new(
"client" => {
"id" => @salesforce_profile.client_id,
"secret" => @salesforce_profile.client_secret
},
"request_token_url" => "#{@salesforce_profile.tenant_endpoint}.auth.marketingcloudapis.com/v1/requestToken",
"defaultwsdl" => "#{@salesforce_profile.tenant_endpoint}.soap.marketingcloudapis.com/etframework.wsdl"
)
end
row_client = ::MarketingCloudSDK::DataExtension::Row.new
row_client.authStub = auth_client
row_client.filter = nil
row_client.props =
{
# We are hard coding in the column names here based off of the hard coded data extension above.
# This code will need to be fixed to use the column_names method above and then update based off of those
"CampaignExpirationDate" => offer.campaign.end_time,
"CampaignName" => offer.campaign.name,
"CampaignGuid" => offer.campaign.guid,
"LastDismissDate" => offer.dismissed_at,
"LastImpressionDate" => offer.viewed_at,
"FirstImpressedAt" => offer.first_viewed_at,
"FistClickedAt" => offer.first_clicked_at,
"LastClickDate" => offer.clicked_at,
"BannerActivationDate" => offer.created_at,
"SubscriberKey" => subscriber_key,
"FirstViewedAt" => offer.first_viewed_at,
"LastViewDate" => offer.viewed_at,
"MobileBannerName" => mobile_banner_name,
"JourneyName" => journey_name,
"ViewCount" => offer.impression_count.to_s,
"ImpressionCount" => offer.impression_count.to_s,
"CampaignPriority" => offer.campaign.priority.to_s,
}
@row_response = row_client.post
Expected behavior A successful response
Environment
- SDK Version: 1.3.1
- Ruby version: jruby-9.3.8.0
The bug has the severity
- [ ] Critical: The defect affects critical functionality or critical data. It does not have a workaround.
- [ ] Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
- [ ] Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
- [ ] Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.
Upon further discovery, we have determined this issue is not to be a bug with FuelSDK-Ruby but caused by a bug in Savon 1.13.0 and has been fixed in 1.14.0. For anyone experiencing something similar you can downgrade to 1.12.1 or upgrade to 1.14.0 (requires Ruby 2.7).
@davideroberts I think you meant 2.x not 1.x, but you saved my day 🎉 🎉 🎉 I had no idea why the requests were bad request and I thought it has something to do with our configuration but I didn't expect it to be coming from savon gem. Thanks so much!