iRestAdmin
Member
Hi All,
I'm trying to figure out how to create or update a Salesforce contact when a new Customer is created in Shopify. It doesn't look like there's an option for that, so I'm trying to build something. If there's a better way, please point me in the right direction. (Maybe I should forget about the update and just have a filter to create contact if nothing is found instead?)
It's easy enough to trigger with Shopify: Customer Create.
Then I do a Salesforce: Search. This is fine when there is already a contact. I get a "SearchRecords 0 Id" that I can map into the Route. But when there isn't a contact that "SearchRecords 0 Id" field disappears. What's the right way to handle this?
I've created 2 Routes but they are failing on the "save & send test request" step, with the following errors:
1) Create Contact (if field "SearchRecords 0 Id" is empty)
0 Message: Cannot deserialize instance of double from VALUE_STRING value last or request may be missing a required field at [line:1, column:204]
0 ErrorCode: JSON_PARSER_ERROR
2) Update Contact (if field "SearchRecords 0 Id" is not empty)
HTTP Status Code: 204
Message: The application processed the request but returned a blank response. Refer to the HTTP status code above for details.
I also created a new customer in Shopify to see if it would be created in Salesforce, but despite the run showing as success in history, the contact was not updated.
What do you think?
I'm trying to figure out how to create or update a Salesforce contact when a new Customer is created in Shopify. It doesn't look like there's an option for that, so I'm trying to build something. If there's a better way, please point me in the right direction. (Maybe I should forget about the update and just have a filter to create contact if nothing is found instead?)
It's easy enough to trigger with Shopify: Customer Create.
Then I do a Salesforce: Search. This is fine when there is already a contact. I get a "SearchRecords 0 Id" that I can map into the Route. But when there isn't a contact that "SearchRecords 0 Id" field disappears. What's the right way to handle this?
I've created 2 Routes but they are failing on the "save & send test request" step, with the following errors:
1) Create Contact (if field "SearchRecords 0 Id" is empty)
0 Message: Cannot deserialize instance of double from VALUE_STRING value last or request may be missing a required field at [line:1, column:204]
0 ErrorCode: JSON_PARSER_ERROR
2) Update Contact (if field "SearchRecords 0 Id" is not empty)
HTTP Status Code: 204
Message: The application processed the request but returned a blank response. Refer to the HTTP status code above for details.
I also created a new customer in Shopify to see if it would be created in Salesforce, but despite the run showing as success in history, the contact was not updated.
What do you think?
Last edited: