Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

MarketingCloudSDK::TriggeredSend doesn't support client ID #76

Open
will-in-wi opened this issue Jul 27, 2017 · 0 comments
Open

MarketingCloudSDK::TriggeredSend doesn't support client ID #76

will-in-wi opened this issue Jul 27, 2017 · 0 comments

Comments

@will-in-wi
Copy link

In an enterprise installation, you have to provide a client ID as part of the SOAP response. I subclassed it to fix the issue in my system:

class OurWorkingTriggeredSend < MarketingCloudSDK::TriggeredSend
  def send(client_id)
    if properties.is_a? Array
      tscall = []
      properties.each do |p|
        tscall.push(
          'TriggeredSendDefinition' => {
            'CustomerKey' => p['CustomerKey']
          },
          'Subscribers' => p['Subscribers'],
          'Attributes' => p['Attributes'],
          'Client' => { 'ID' => client_id }
        )
      end
    else
      tscall = { 'TriggeredSendDefinition' => properties, 'Subscribers' => @subscribers, 'Attributes' => @attributes, 'Client' => { 'ID' => client_id } }
    end
    client.soap_post 'TriggeredSend', tscall
  end
end

But I'm not sure how this would prefer to be fixed upstream. If you would give me any hints as to a preferred mechanism, I'll send a pull request.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant