I have…
- [ X] Read the following guideline: https://docs.squidex.io/01-getting-started/installation/troubleshooting-and-support. I understand that my support request might get deleted if I do not follow the guideline.
- [ ] Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [ ] Bug report
- [ ] Performance issue
- [X ] Documentation issue or request
Environment
- [X ] Self hosted with docker
- [ ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: 7.8.0
Browser:
- [ ] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
Hi Sebastian,
This rule used to work, but I changed something and now the request body is the payload submitted as text. Instead of the enriched data.
I have the following script:
getReference(event.data.order.iv, function (references) {
var order = references[0].data;
var jsonObject = {
id: event.id,
shippingUrl: event.data.shippingUrl.iv,
givenName: order.ShippingAddress.iv.GivenName,
familyName: order.ShippingAddress.iv.FamilyName,
email: order.ShippingAddress.iv.Email,
carrier: event.data.carrier.iv,
trackingCode: event.data.trackingCode.iv,
mollieId: order.MollieId.iv
};
complete(JSON.strigify(jsonObject));
})
and this Action Data:
{ "method": "POST", "requestUrl": "https://22c5-204-168-146-209.ngrok-free.app/api/v1/Shipping/SendShippingMail", "requestSignature": "ZyKO1v2gi0lgmuY3KNtuBZZmIo7K/RAgj6rFoUfdkt8=", "requestBody": "getReference(event.data.order.iv, function (references) {\n\tvar order = references[0].data;\n\n\tvar jsonObject = {\n\t id: event.id,\n\t\tshippingUrl: event.data.shippingUrl.iv,\n\t\tgivenName: order.ShippingAddress.iv.GivenName,\n\t\tfamilyName: order.ShippingAddress.iv.FamilyName,\n\t\temail: order.ShippingAddress.iv.Email,\n\t\tcarrier: event.data.carrier.iv,\n\t\ttrackingCode: event.data.trackingCode.iv,\n\t\tmollieId: order.MollieId.iv\n\t};\n\t\n\tconsole.log(jsonObject);\n\t\n\t\n\tcomplete(JSON.strigify(jsonObject));\n})", "requestBodyType": "application/json", "headers": { "XApiKey": "jO3!EFKtmm9@vHhZYcHrua43^321e4tdssdfsd24323sdfeEFsds" } }
But I want the request body to be something like this:
{ id: "12345", shippingUrl: "https://squidex.io", givenName: "Martijn" }
Can you help me out?