Happy Business Starts Here

Student

SOAP API subscribe error : Missing required value: Name

Hi guys,

I 'm trying to use the subcribe function with the SOAP API. I call the fonction subscribe with these parameters :

Array
(
    [0] => Array
        (
            [Account] => Array
                (
                    [AccountId] => 2c92c0f85c48f335015c56eb44450455
                )
            [BillToContact] => Array
                (
                    [ContactId] => 2c92c0f95c490174015c56f0659e3e22
                )
            [SubscriptionData] => Array
                (
                    [Subscription] => Array
                        (
                            [AutoRenew] => 0
                            [ContractEffectiveDate] => 2017-02-01
                            [Name] => Pack Pre
                            [Nom_du_vendeur__c] => BTEST - V0019999
                            [OldContractId__c] => 7948165
                            [RenewalSetting] => RENEW_WITH_SPECIFIC_TERM
                            [RenewalTerm] =>
                            [ServiceActivationDate] => 2017-02-01
                            [TermStartDate] => 2017-02-01
                            [Status] => Draft
                            [TermType] => TERMED
                            [AccountId] => 2c92c0f85c48f335015c56eb44450455
                            [InvoiceOwnerId] => 2c92c0f85c48f335015c56eb44450455
                        )
                    [RatePlanData] => Array
                        (
                            [RatePlan] => Array
                                (
                                    [ProductRatePlanId] => 2c92c0f957bc82720157becaa2d61655
                                )
                        )
                )
        )
)

 

And I get this result :

stdClass Object
(
    [AccountId] =>
    [AccountNumber] =>
    [Errors] => stdClass Object
        (
            [Code] => MISSING_REQUIRED_VALUE
            [Message] => Missing required value: Name
        )
    [InvoiceId] =>
    [InvoiceNumber] =>
    [InvoiceResult] =>
    [SubscriptionId] =>
    [SubscriptionNumber] =>
    [Success] =>
    [TotalMrr] =>
    [TotalTcv] =>
)

 

My subscription has a name so I don't know which field Name is the problem. Do you have an idea of the source of my problem ?

 

My WSDL is in version version 85

 

Thanks.

Tags (3)
7 REPLIES 7
Highlighted
Master

Re: SOAP API subscribe error : Missing required value: Name

Try subscriptionNumber. In rest API the capitalization is exactly that way.
Student

Re: SOAP API subscribe error : Missing required value: Name

Hi Bolaurent,

 

Thanks for your reactivity and your answer.

 

However I tried ti add the field subscriptionNumber in my subscription array and I still have the same error :

Array
(
    [0] => Array
        (
            [Account] => Array
                (
                    [AccountId] => 2c92c0f85c48f335015c56eb44450455
                )
            [BillToContact] => Array
                (
                    [ContactId] => 2c92c0f95c490174015c56f0659e3e22
                )
            [SubscriptionData] => Array
                (
                    [Subscription] => Array
                        (
                            [AutoRenew] => 0
                            [ContractEffectiveDate] => 2017-02-01
                            [Name] => Pack Google Pre
                            [Nom_du_vendeur__c] => DOBIGNY - V00131285
                            [OldContractId__c] => 7948165
                            [RenewalSetting] => RENEW_WITH_SPECIFIC_TERM
                            [RenewalTerm] =>
                            [ServiceActivationDate] => 2017-02-01
                            [TermStartDate] => 2017-02-01
                            [Status] => Draft
                            [TermType] => TERMED
                            [AccountId] => 2c92c0f85c48f335015c56eb44450455
                            [InvoiceOwnerId] => 2c92c0f85c48f335015c56eb44450455
                            [subscriptionNumber] => A-S00000041
                        )
                    [RatePlanData] => Array
                        (
                            [RatePlan] => Array
                                (
                                    [ProductRatePlanId] => 2c92c0f957bc82720157becaa2d61655
                                )
                        )
                )
        )
)

 

By the way I tried with the name subscriptionNumber, SubscriptionNumber and Number without success.

 

Do you have any other idea ? Thanks for your help.

Support SME

Re: SOAP API subscribe error : Missing required value: Name

Hi @sfaure could you capture the output of your code, the actual outgoing call? As far as I can tell, you're providing Name to a subscription, and Name is not even a required field as the subscription will receive the next subscription sequence number if you don't specify it.

 

So I'd definitely like to take a look at the outgoing call your code is generating.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Student

Re: SOAP API subscribe error : Missing required value: Name

Hi Viktor,

 

You can find my code here : https://github.com/Myddleware/myddleware/blob/master/src/Myddleware/RegleBundle/Solutions/zuora.php

The subscribe call is at the line 303.

 

Here are the 3 objects in input :

Zuora_Account Object
(
    [zTypeSmiley Tonguerotected] => Account
    [_dataSmiley Tonguerotected] => Array
        (
            [AccountNumber] =>
            [AccountId] => 2c92c0f95c65768c015c7a5e481f31b7
        )
)


Zuora_SubscriptionData Object
(
    [zTypeSmiley Tonguerotected] => SubscriptionData
    [zSubscription] => Zuora_Subscription Object
        (
            [zTypeSmiley Tonguerotected] => Subscription
            [_dataSmiley Tonguerotected] => Array
                (
                    [AutoRenew] => 1
                    [ContractAcceptanceDate] => 2017-06-06T02:29:06
                    [ContractEffectiveDate] => 2016-10-10
                    [Currency] => USD
                    [InitialTerm] => 12
                    [RenewalTerm] => 12
                    [ServiceActivationDate] => 2016-10-10
                    [Status] => Draft
                    [TermStartDate] => 2016-10-10
                    [Version] => 1
                    [Name] => Abonnement VP
                    [Nom_du_vendeur__c] => FANJAUD - V00126738
                    [OldContractId__c] => 5953339
                    [RenewalSetting] => RENEW_WITH_SPECIFIC_TERM
                    [TermType] => TERMED
                    [AccountId] => 2c92c0f95c65768c015c7a5e481f31b7
                    [InvoiceOwnerId] => 2c92c0f95c65768c015c7a5e481f31b7
                )
        )
    [_ratePlanDataObjects:Zuora_SubscriptionDataSmiley Tonguerivate] => Array
        (
            [0] => Zuora_RatePlanData Object
                (
                    [zTypeSmiley Tonguerotected] => RatePlanData
                    [zRatePlan] => Zuora_RatePlan Object
                        (
                            [zTypeSmiley Tonguerotected] => RatePlan
                            [_dataSmiley Tonguerotected] => Array
                                (
                                    [ProductRatePlanId] => 2c92c0f85c48f2ef015c5f099d5b5a04
                                )
                        )
                    [_ratePlanChargeDataObjects:Zuora_RatePlanDataSmiley Tonguerivate] => Array
                        (
                        )
                    [_dataSmiley Tonguerotected] => Array
                        (
                        )
                )
        )
    [_dataSmiley Tonguerotected] => Array
        (
        )
)


Zuora_Contact Object
(
    [zTypeSmiley Tonguerotected] => Contact
    [_dataSmiley Tonguerotected] => Array
        (
            [ContactId] => 2c92c0f85c656dbf015c7a5ef4617b73
        )
)

 

And here is the output result :
stdClass Object
(
    [result] => Zuora_SubscribeResult Object
        (
            [zTypeSmiley Tonguerotected] => Zuora_SubscribeResult
            [_dataSmiley Tonguerotected] => Array
                (
                    [AccountId] =>
                    [AccountNumber] =>
                    [Errors] => Zuora_Error Object
                        (
                            [zTypeSmiley Tonguerotected] => Zuora_Error
                            [_dataSmiley Tonguerotected] => Array
                                (
                                    [Code] => MISSING_REQUIRED_VALUE
                                    [Message] => Missing required value: Name
                                )
                        )
                    [InvoiceId] =>
                    [InvoiceNumber] =>
                    [InvoiceResult] =>
                    [SubscriptionId] =>
                    [SubscriptionNumber] =>
                    [Success] =>
                    [TotalMrr] =>
                    [TotalTcv] =>
                )
        )
)

 

Let me know if you need more detail. Thanks again for your help.

 

Student

Re: SOAP API subscribe error : Missing required value: Name

Hi guys,

 

Sorry, I have found my mistake. The field "Name" missing was the "Name" of the Account. Zuora couldn't found the account because I have put the wrong name field for the Id (AccountId instead of id)

 

$zAccount = new \Zuora_Account();
$zAccount->AccountId = $value;   //  => Wrong

$zAccount->Id = $value;  // => OK

 

Thanks for your time and your reactivity.

Community Manager

Re: SOAP API subscribe error : Missing required value: Name

Thanks for the update @sfaure and glad to here that you've fixed your issue.

 

Also, welcome to the Community!

 


Lana Lee | Senior Community Manager and Strategist
"A little consideration, a little thought for others, makes all the difference." —A. A. Milne
Support SME

Re: SOAP API subscribe error : Missing required value: Name

Hi @sfaure glad to hear it's fixed!

 

It's usually suggested to provide not your code, but the generated output call, since we can plug that into our prepared test templates and spot quickly what the issue is, while we can't do the same with the source code.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √